# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1517559347 -19800 # Node ID 05fe5239fca22516a14a5b860593f2beeca55d64 # Parent b2f591aa450708b7bc7a09ee46bf88f9d840913f tests: add a test showing grabbing of secret changeset turn it into draft This patch adds a test showing wrong behavior of `hg grab` command which looses the secret phase while grabbing a secret changeset. diff -r b2f591aa4507 -r 05fe5239fca2 tests/test-grab.t --- a/tests/test-grab.t Fri Feb 02 15:37:00 2018 +0530 +++ b/tests/test-grab.t Fri Feb 02 13:45:47 2018 +0530 @@ -242,3 +242,61 @@ | o 0:1f0dee641bb7 add a +Checking phase preservation while grabbing secret changeset + +In case of merge conflicts + + $ hg phase -r 7c15c05db6fa -s -f + + $ hg grab -r 7c15c05db6fa + grabbing 5:7c15c05db6fa "add b" + merging b + warning: conflicts while merging b! (edit, then use 'hg resolve --mark') + unresolved merge conflicts (see hg help resolve) + [1] + + $ echo bar > b + $ hg resolve -m + (no more unresolved files) + continue: hg grab --continue + + $ hg grab --continue + $ hg phase -r . + 10: draft + +No merge conflicts + + $ hg up d46dc301d92f + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ echo foo > l + $ hg add l + $ hg ci -qm "added l" --secret + + $ hg phase -r . + 11: secret + + $ hg glog + @ 11:508d572e7053 added l + | + | o 10:cd90ed194449 add b + | | + | o 9:902d4f4602bb foo to b + | | + | o 8:44e155eb95c7 add c + | | + | o 7:2ccc03d1d096 foo to c + |/ + o 4:d46dc301d92f add y + | + o 3:8e224524cd09 add x + | + o 0:1f0dee641bb7 add a + + $ hg up cd90ed194449 + 3 files updated, 0 files merged, 1 files removed, 0 files unresolved + + $ hg grab -r 508d572e7053 + grabbing 11:508d572e7053 "added l" + + $ hg phase -r . + 12: draft