= Mercurial Branches = This page documents how to use Mercurial, rather than Subversion, to hack on Django. == Core developers == For people who are core committers, and want to use Mercurial rather than Subversion as their client: 1. Install the [http://mercurial.selenic.com/wiki/HgSubversion hgsubversion] extension (and understand basically how it works). 2. Clone the Subversion repository (do this using hg version 1.5 or higher, or else the changeset hashes generated by hgsubversion will be incompatible with those from repos generated using newer hg versions, including the [http://bitbucket.org/django/django/ official Django hg mirror]).: {{{ hg clone svn+http://code.djangoproject.com/svn/django/ django }}} This will take a Good While (lots of hours), and in some cases can take a Very Long Time for just one changeset (I gave up on r11505).[[BR]] ALTERNATIVELY: 1. Clone the [http://bitbucket.org/django/django/ official Django hg mirror] in the normal way, using hg 1.5 or greater. 2. Edit .hg/hgrc to say: {{{ default = svn+http://code.djangoproject.com/svn/django/ }}} 3. Do `hg svn rebuildmeta`. This works because the official Django mirror was been created by hgsubversion, and is updated only by hgsubversion. 3. Use normal hg commands to make commits, switch branches, push back to the subversion repository etc. Remember to use `hg rebase --svn`, and not `hg merge`. === Tips === * Use the [http://mercurial.selenic.com/wiki/BookmarksExtension bookmarks] extension for git-style local feature branches. * Alternatively, use the [http://mercurial.selenic.com/wiki/MqExtension queues] extension to manage long lived patches. * To collapse several commits into a single commit before pushing back to svn, use the [http://mercurial.selenic.com/wiki/HisteditExtension histedit] extension * To backport a changeset from trunk, use the [http://mercurial.selenic.com/wiki/TransplantExtension transplant] extension