hg status, hg diff do not consider an enabled keyword extension --> leads to empty commits

Christian Ebert blacktrash at gmx.net
Mon Jul 20 03:21:11 CDT 2009


* rupert.thurner on Sunday, July 19, 2009 at 06:22:28 -0700
> On Jul 17, 1:48 pm, Christian Ebert <blacktr... at gmx.net> wrote:
>> * rupert.thurner on Thursday, July 16, 2009 at 21:54:04 -0700
>> 
>>> we did:
>> 
>>> svn co <url> mydir
>>> cd mydir
>>> hg init
>> 
>> Oh, you didn't tell me that you don't use the convert extension.
>> 
>> I think the right/save way would be to do:
>> 
>> svn co <url> mydir
>> hg convert mydir mydir-hg
>> cd mydir-hg
>> 
>>> hg add
>>> hg commit
>> 
>> cd ..
>> hg convert -s hg -d svn mydir-hg mydir
>> 
>> I'm really not sure if having a hg repo inside an svn repo is a
>> good idea.
> 
> its on the client side, so its a mixed working copy having a .hg,
> and .svn's. the ideal solution would be probably hgsvn ... but that
> was not that good when we started.
> 
> it works not bad, except that subversion changes the keyword contents,
> and mercurial thinks its a change.

Yes, and you can avoid that by running the "revert script" after
the svn checkout, and then you are in the hg sphere. Hg and svn
revision numbers are not compatible anyway. So you work inside hg
and revsions that (so far) only exists in hg are marked with hg
keywords. Then before checking into svn, you "hg kwshrink" and
then svn commit, and are in the "svn sphere" again.

You could also say that after running the "revert script" svn
thinks there are changes. So, if you decide that after switching
to the "hg sphere" you actually don't want to do anything in hg
but continue in svn, why don't you do "svn up -C"?

> the keyword extension seemed to be
> the perfect solution for this - if it could do shrink, expand, ignore
> (take it as it is)

While this is feasable, albeit dangerous, I still don't see the
need for it. Plus, you'd have a mix of svn and hg revision
numbers in the files ...

c
-- 
\black\trash movie    _C O W B O Y_  _C A N O E_  _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html


More information about the Mercurial mailing list