tests/test-merge-revert.out
author Bryan O'Sullivan <bos@serpentine.com>
Sun, 07 Aug 2005 12:43:11 -0800
changeset 870 a82eae840447
parent 839 9c918287d10b
child 862 d70c1c31fd45
child 866 6d6095823b82
child 894 62ec665759f2
child 895 77b52b864249
permissions -rw-r--r--
Teach walk code about absolute paths. The first consequence of this is that absolute and relative paths now all work in the same way. The second is that paths that lie outside the repository now cause an error to be reported, instead of something arbitrary and expensive being done. Internally, all of the serious work is in the util package. The new canonpath function takes an arbitrary path and either returns a canonical path or raises an error. Because it needs to know where the repository root is, it must be fed a repository or dirstate object, which has given commands.matchpats and friends a new parameter to pass along. The util.matcher function uses this to canonicalise globs and relative path names. Meanwhile, I've moved the Abort exception from commands to util, and killed off the redundant util.CommandError exception.

+ hg init
+ hg add file1 file2
+ hg commit -m added file1 and file2 -d 0 0 -u user
+ hg commit -m changed file1 -d 0 0 -u user
+ hg -q log
1:3aa14bbc23d90e3f8b5b639b4a43d76509bae76c
0:8633637036c18f021d771208e16ae3508ab81d28
+ hg id
3aa14bbc23d9 tip
+ hg update -C 0
+ hg id
8633637036c1
+ hg id
8633637036c1+
+ hg revert
+ hg diff
+ hg status
+ hg id
8633637036c1
+ hg update
+ hg diff
+ hg status
+ hg id
3aa14bbc23d9 tip
+ hg update -C 0
+ hg update
merging file1
+ hg diff
FIXME: This is a known bug:
+ hg status
+ hg id
3aa14bbc23d9 tip
+ hg revert
+ hg diff
+ hg status
+ hg id
3aa14bbc23d9 tip
+ hg revert -r tip
+ hg diff
+ hg status
+ hg id
3aa14bbc23d9 tip
+ hg update -C
+ hg diff
+ hg status
+ hg id
3aa14bbc23d9 tip