D3663: graft: add test showing --continue not preserving --edit passed earlier
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Fri May 25 22:25:27 UTC 2018
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Right now, if you run `hg graft --edit`, face some conflicts, resolve them and
then run `hg graft --continue`, you will see graft no longer pops up for the
editor and you hate mercurial for not remembering arguments you passed earlier.
Upcoming patch will fix this buggy behavior and this test will help us in
realizing those changes.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3663
AFFECTED FILES
tests/test-graft.t
CHANGE DETAILS
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -1565,3 +1565,44 @@
o 3:9e887f7a939c bar to b
|
~
+
+Test that --edit is preserved and reused in `hg graft --continue`
+
+ $ hg up '.^^'
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+ $ HGEDITOR=cat hg graft -r 1 -r 2 --edit
+ grafting 1:80e6d2c47cfe "added b"
+ merging b
+ warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
+ abort: unresolved conflicts, can't continue
+ (use 'hg resolve' and 'hg graft --continue')
+ [255]
+
+ $ echo foobar > b
+ $ hg resolve -m
+ (no more unresolved files)
+ continue: hg graft --continue
+ $ HGEDITOR=cat hg graft --continue
+ grafting 1:80e6d2c47cfe "added b"
+ grafting 2:8be98ac1a569 "added c"
+
+ $ hg log -Gr '.^^::.'
+ @ changeset: 13:7ee8d3496b19
+ | tag: tip
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: added c
+ |
+ o changeset: 12:802f1eae3af3
+ | parent: 3:9e887f7a939c
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: added b
+ |
+ o changeset: 3:9e887f7a939c
+ | parent: 0:f7ad41964313
+ ~ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: bar to b
+
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list