Working with Subversion
Giorgos Keramidas
keramida at ceid.upatras.gr
Sun Feb 17 20:36:26 CST 2008
On 2008-02-17 17:03, Patrick M??zard <pmezard at gmail.com> wrote:
> Hello,
>
> Details about interoperating with Subversion repositories can be found here:
>
> http://www.selenic.com/mercurial/wiki/index.cgi/WorkingWithSubversion
>
>
> It is not exhaustive, I expect hgsvn users to describe a typical hgsvn session there.
>
> Also, these recipes are based on my own habits and people may have
> better tricks. Perhaps Brian could provide some insights about
> practical uses or pitfalls of the existing but non-advertized
> Subversion sink of convert extension. While many operations can be
> scripted, I intentionally avoided it for non-portability can be
> deceiving and to highlight the amount of manual intervention required
> from a newcomer.
Hi Patrick,
First of all, that is a nice page. Thank you for writing it :)
Another recipe, similar to the MQ based one is with named Hg branches,
i.e. something along the lines of:
Step 1. Import a Subversion snapshot
$ svn co svn://repo.org/subversion/trunk trunk
A trunk/a
Checked out revision 1.
$ cd trunk
$ hg init
$ cat > .hgignore <<EOF
> \.svn/
> \.hgignore$
> EOF
$ hg st
? a
$ hg ci -Am "Initializing from subversion checkout"
adding a
Step 2. Create a named branch
$ hg branch keramida
Step 3. Hack the sources
$ echo b >> a
$ hg st
M a
$ hg ci -m 'first "keramida" branch commit'
Keep hacking the sources as much as needed:
$ echo more b >> a
$ hg ci -m 'another "keramida" branch commit'
Step 4. When the local path is ready, pull a new Subversion snapshot on
top of the default branch
$ hg up -C default
$ svn up
U a
A b
Step 5. Transplant the `keramida' branch on top of the new default tip
$ hg transplant -a -b keramida
Does this sound like something I could polish a bit and add to the Wiki
page too?
More information about the Mercurial
mailing list