how to *really* revert?

Andrew Thompson andrewkt at aktzero.com
Tue Aug 9 10:54:26 CDT 2005


Mark Williamson wrote:
>>> Does hg status give any interesting information?  Have you committed
>>> anything to your repository?
>>>       
>> yeh, hg status returns:
>>
>> dargo:~/xen-unstable.hg> hg status
>> M linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
>> M tools/python/xen/lowlevel/xs/xs.c
>> M tools/python/xen/xm/main.py
>> M xen/arch/x86/mm.c
>> M xen/include/asm-x86/page.h
>>     
>
> Just a thought: from my memory, the changes detection code compares timestamps 
> before it compares file contents.  Perhaps if you've touched those files at 
> some point, they've got the wrong timestamps and that's throwing this out?
>
> This really needs an hg developer to confirm or deny...
>   

That should not be the case. I believe the logic is check 
file-modified-time, if different look further(diff?), else continue on.

I just updated to hg version c333dfa8fa1a:

~/hgdate $ ls
CONTRIBUTORS  README          contrib   hgmerge    rewrite-log
COPYING       TODO            doc       hgweb.cgi  setup.py
MANIFEST.in   build           hg        mercurial  templates
PKG-INFO      comparison.txt  hgeditor  notes.txt  tests
~/hgdate $ hg status
~/hgdate $ touch hg
~/hgdate $ hg status
~/hgdate $

PS: This is from a mercurial repository I cloned just to test this.
PPS: Throwaway trees are nice. :) cd ~ && rm -rf hgdate

-- 
Andrew Thompson
http://aktzero.com/



More information about the Mercurial mailing list