Show More
@@ -1003,6 +1003,33 b' Test that update_hash_refs works.' | |||||
1003 | o 0: d20a80d4def3 'base' |
|
1003 | o 0: d20a80d4def3 'base' | |
1004 |
|
1004 | |||
1005 |
|
1005 | |||
|
1006 | Add an explicit test for rewrite_hash_refs when the detected prefix is | |||
|
1007 | ambiguous. Here's the super low-tech way I found this collision, if the hashing | |||
|
1008 | scheme ever changes: | |||
|
1009 | # hg init | |||
|
1010 | # echo test0 > test | |||
|
1011 | # hg ci -qAm 'test0' -u 'test' -d '0 0' | |||
|
1012 | # i=1 | |||
|
1013 | # while [[ $(chg log -r . -T'{shortest(node, 6)}' | wc -c) -eq 6 ]]; do | |||
|
1014 | # chg co -r 0000000000 | |||
|
1015 | # echo "test$i" > test | |||
|
1016 | # chg ci -qAm "test$i" -u test -d '0 0' | |||
|
1017 | # (( ++i )) | |||
|
1018 | # done | |||
|
1019 | $ hg co -q 0000000000 | |||
|
1020 | $ echo test5281 > test | |||
|
1021 | $ hg ci -qAm 'test5281' | |||
|
1022 | $ hg co -q 000000000 | |||
|
1023 | $ echo test9912 > test | |||
|
1024 | $ hg ci -qAm 'test9912' | |||
|
1025 | $ hg co -q 4 | |||
|
1026 | $ echo contents > some_file | |||
|
1027 | $ hg ci -qAm 'The previous two (parentless) commits had a hash prefix of b04363. Check that rewrite_hash_refs will not fail because of that.' | |||
|
1028 | $ hg rebase -r . -d 5 | |||
|
1029 | rebasing 8:5c4cdabf5769 tip "The previous two (parentless) commits had a hash prefix of b04363. Check that rewrite_hash_refs will not fail because of that." | |||
|
1030 | abort: 00changelog@b04363: ambiguous identifier (known-bad-output !) | |||
|
1031 | [50] | |||
|
1032 | ||||
1006 | $ cd .. |
|
1033 | $ cd .. | |
1007 |
|
1034 | |||
1008 | Test (virtual) working directory without changes, created by merge conflict |
|
1035 | Test (virtual) working directory without changes, created by merge conflict |
General Comments 0
You need to be logged in to leave comments.
Login now