Working with a central subversion repository

John D. Mitchell jdmitchell at gmail.com
Wed Jun 11 09:32:51 CDT 2008


On Wednesday 2008.06.11, at 02:36 , Robert Wierschke wrote:
[...]
>
> I'm currently using the following approach that might me not the  
> best and requires commit access to the svn (but somehow works for me).
>
>  - Create a check out form the svn
>  - in the same directory init an hg repository
>  - the both repositories to ignore each others special files  
> (.svn, .hg)
>  - clone from this repository and do your work
>  - push back to the hybrid repository and commit via svn

FWIW, I do this all the time to deal with projects that use e.g. svn.

In some cases, I actually check in the Hg repository into svn as well.

> If you need to have exactly each commit (and message) you either  
> need to do this every hg commit or use the mercurial queues  
> extension to give you the change to later reproduce the commits in  
> order to apply same separately to the svn.

I treat the Hg repo as a nice, clean branchable point.  I.e., do the  
check out via svn.  Make sure the in-place Hg repo is up to date  
(i.e., test and commit to hg if there were upstream changes in the svn  
repo).  Then clone the hg repo one (or more) times to implement some  
new feature, etc. then pull those changes back into the in-place hg  
repo inside svn.  Do one nice clean check in into svn.  This is akin  
to: http://www.selenic.com/mercurial/wiki/index.cgi/ConcatenatingChangesets

Have fun,
John



More information about the Mercurial mailing list