[PATCH 2 of 3 V4] rebase tests: verify that we will abort pull early during graft in progress
Valters Vingolds
valters at vingolds.ch
Fri Jan 6 15:11:04 UTC 2017
# HG changeset patch
# User Valters Vingolds <valters at vingolds.ch>
# Date 1483701359 -3600
# Fri Jan 06 12:15:59 2017 +0100
# Node ID f9ef0679fabea8ef0ab65aa7f76258e248473a8e
# Parent ba648b03fc21c8213d580c8ed193002511e3f872
rebase tests: verify that we will abort pull early during graft in progress
Created (a bit involved) test that generates a graft in-progress state,
and check that pull with --rebase will abort early if working state is unclean.
diff --git a/tests/test-rebase-pull.t b/tests/test-rebase-pull.t
--- a/tests/test-rebase-pull.t
+++ b/tests/test-rebase-pull.t
@@ -86,6 +86,43 @@
[255]
$ rm .hg/rebasestate
+Abort pull early if another operation (graft) is in progress:
+ $ cd ..
+ $ hg clone a d --noupdate
+ $ cd d
+ $ hg update 0 --quiet
+ $ echo original > graft-conflict.txt
+ $ hg commit -A -m "graft source" # = rev 3
+ adding graft-conflict.txt
+ created new head
+ $ hg update 2 --quiet
+ $ echo conflict > graft-conflict.txt
+ $ hg commit -A -m "graft target" # = rev 4
+ adding graft-conflict.txt
+ $ hg tglog
+ @ 4: 'graft target'
+ |
+ | o 3: 'graft source'
+ | |
+ o | 2: 'R1'
+ | |
+ o | 1: 'C2'
+ |/
+ o 0: 'C1'
+
+ $ hg graft 3 # on top of rev 4: will fail
+ grafting 3:63be2bb2afb6 "graft source"
+ merging graft-conflict.txt
+ warning: conflicts while merging graft-conflict.txt! (edit, then use 'hg resolve --mark')
+ abort: unresolved conflicts, can't continue
+ (use 'hg resolve' and 'hg graft --continue')
+ [255]
+ $ hg pull --rebase
+ abort: graft in progress
+ (use 'hg graft --continue' or 'hg update' to abort)
+ [255]
+
+
Invoke pull --rebase and nothing to rebase:
$ cd ../c
More information about the Mercurial-devel
mailing list