tests/test-parents.out
author Matt Mackall <mpm@selenic.com>
Wed, 01 Aug 2007 12:33:12 -0500
changeset 5045 f191bc3916f7
parent 4894 be5dc5e3ab2d
child 5299 5a4824f6665c
permissions -rw-r--r--
merge: do early copy to deal with issue636 Without copies/renames, merges source names are 1:1 with their targets. Copies and renames introduce the possibility that there will be two merges with the same input but different output. By doing the copy to the destination name before the merge, the actual merge becomes 1:1 again, and no source is the input to two different merges. - add a preliminary scan to applyupdates to do copies - for the merge action, pass the old name (for finding ancestors) and the new name (for input to the merge) to filemerge - eliminate the old post-merge copy - lookup file contents from new name in filemerge - pass new name to external merge helper - report merge failure at new name - add a test

% no working directory
adding a
adding b
% hg parents
changeset:   2:6cfac479f009
tag:         tip
user:        test
date:        Thu Jan 01 00:00:02 1970 +0000
summary:     b

% hg parents a
changeset:   0:b6a1406d8886
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     ab

% hg parents -r 2
changeset:   1:d786049f033a
user:        test
date:        Thu Jan 01 00:00:01 1970 +0000
summary:     a

% hg parents -r 2 a
changeset:   0:b6a1406d8886
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     ab

% hg parents -r 2 ../a
abort: ../a not under root
% cd dir; hg parents -r 2 ../a
changeset:   0:b6a1406d8886
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     ab

% hg parents -r 2 path:a
changeset:   0:b6a1406d8886
user:        test
date:        Thu Jan 01 00:00:00 1970 +0000
summary:     ab

% hg parents -r 2 glob:a
abort: can only specify an explicit file name