Mercurial > hg
comparison tests/test-rebase-inmemory.t @ 47786:324c8a299324 stable
tests: add explicit coverage for update_hash_refs from rewriteutil
I couldn't find any evidence this is covered by tests in core (but there's a
good chance I missed it). We've seen a cute bug in that code, but first
let's just cover the cases that work correctly.
Differential Revision: https://phab.mercurial-scm.org/D11231
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 29 Jul 2021 16:18:35 -0400 |
parents | b7ccdb52e0f9 |
children | 48da5c325750 |
comparison
equal
deleted
inserted
replaced
47785:59bc92a7c60f | 47786:324c8a299324 |
---|---|
961 o | 1: 6f252845ea45 'a' | 961 o | 1: 6f252845ea45 'a' |
962 |/ | 962 |/ |
963 o 0: d20a80d4def3 'base' | 963 o 0: d20a80d4def3 'base' |
964 | 964 |
965 | 965 |
966 Test that update_hash_refs works. | |
967 $ hg co 0 | |
968 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
969 $ echo update_hash_refs > update_hash_refs | |
970 $ hg add update_hash_refs | |
971 $ hg ci -m 'this will change hash' | |
972 created new head | |
973 $ echo changed >> update_hash_refs | |
974 $ hg ci -m "this starts as the child of `hg log -r . -T'{node|short}'` but not 506e2454484b" | |
975 $ hg tglog | |
976 @ 5: becd28036887 'this starts as the child of 98789aa60148 but not 506e2454484b' | |
977 | | |
978 o 4: 98789aa60148 'this will change hash' | |
979 | | |
980 | o 3: 506e2454484b 'merge' | |
981 | |\ | |
982 +---o 2: 531f80391e4a 'c' | |
983 | | | |
984 | o 1: 6f252845ea45 'a' | |
985 |/ | |
986 o 0: d20a80d4def3 'base' | |
987 | |
988 $ hg rebase -r '.^::' -d 3 | |
989 rebasing 4:98789aa60148 "this will change hash" | |
990 rebasing 5:becd28036887 tip "this starts as the child of 98789aa60148 but not 506e2454484b" | |
991 saved backup bundle to $TESTTMP/keep_merge/.hg/strip-backup/98789aa60148-72ec40bd-rebase.hg | |
992 $ hg tglog | |
993 @ 5: a445b8426f4b 'this starts as the child of c16c25696fe7 but not 506e2454484b' | |
994 | | |
995 o 4: c16c25696fe7 'this will change hash' | |
996 | | |
997 o 3: 506e2454484b 'merge' | |
998 |\ | |
999 | o 2: 531f80391e4a 'c' | |
1000 | | | |
1001 o | 1: 6f252845ea45 'a' | |
1002 |/ | |
1003 o 0: d20a80d4def3 'base' | |
1004 | |
1005 | |
966 $ cd .. | 1006 $ cd .. |
967 | 1007 |
968 Test (virtual) working directory without changes, created by merge conflict | 1008 Test (virtual) working directory without changes, created by merge conflict |
969 resolution. There was a regression where the file was incorrectly detected as | 1009 resolution. There was a regression where the file was incorrectly detected as |
970 changed although the file contents were the same as in the parent. | 1010 changed although the file contents were the same as in the parent. |