confused about 'hg strip' results

Johan Samyn johan.samyn at gmail.com
Sat Feb 27 20:37:03 UTC 2010


2010/2/27 Christian Ebert <blacktrash at gmx.net>:
> * Johan Samyn on Saturday, February 27, 2010 at 19:01:14 +0100
>> Platform : Mercurial 1.3.1 on Ubuntu 9.04
>> I was surprised about the result of the 'hg strip' command, as in the
>> session hereafter :
>> <clip>
>> [prompt]> echo bbb > b
>> [prompt]> hg add b
>> [prompt]> hg ci -m "add b"
>> [prompt]> hg log -l 3   # find revno to strip
>> ...
>> [prompt]> hg strip REV
>> ...
>> [prompt]> ls -la
>> a
>> c
>> ...
>> [prompt]> hg cifiles
>> a
>> b
>> c
>> ...
>> [prompt]>
>> </clip>
>>
>> I understand the file is not back in the working tree, as that is the
>> job of 'hg revert'.
>> But then why does 'hg cifiles' still report it ?
>
> Because it's a quick'n dirty extension? ;-)
>
> $ file .hg/store/data/b.i
>
> should probably report empty, and cifiles should check whether an
> index file is empty.
>
> c
> --
Could be (quick and dirty), but shouldn't 'hg strip' get rid of that
index file (just as it does not restore the cset content in the
working tree) ?
Johan
--



More information about the Mercurial mailing list