##// END OF EJS Templates
continue: added support for rebase...
Taapas Agrawal -
r42832:35ebdbb3 default
parent child Browse files
Show More
@@ -1928,6 +1928,17 b' def abortrebase(ui, repo):'
1928 1928 rbsrt = rebaseruntime(repo, ui)
1929 1929 rbsrt._prepareabortorcontinue(isabort=True)
1930 1930
1931 def continuerebase(ui, repo):
1932 with repo.wlock(), repo.lock():
1933 rbsrt = rebaseruntime(repo, ui)
1934 ms = mergemod.mergestate.read(repo)
1935 mergeutil.checkunresolved(ms)
1936 retcode = rbsrt._prepareabortorcontinue(isabort=False)
1937 if retcode is not None:
1938 return retcode
1939 rbsrt._performrebase(None)
1940 rbsrt._finishrebase()
1941
1931 1942 def summaryhook(ui, repo):
1932 1943 if not repo.vfs.exists('rebasestate'):
1933 1944 return
@@ -1956,4 +1967,5 b' def uisetup(ui):'
1956 1967 _("specify merge tool for rebase")))
1957 1968 cmdutil.summaryhooks.add('rebase', summaryhook)
1958 1969 statemod.addunfinished('rebase', fname='rebasestate', stopflag=True,
1959 continueflag=True, abortfunc=abortrebase)
1970 continueflag=True, abortfunc=abortrebase,
1971 continuefunc=continuerebase)
@@ -1,3 +1,10 b''
1 #testcases continuecommand continueflag
2 #if continueflag
3 $ cat >> $HGRCPATH <<EOF
4 > [alias]
5 > continue = rebase --continue
6 > EOF
7 #endif
1 8
2 9 $ . "$TESTDIR/narrow-library.sh"
3 10
@@ -69,7 +76,7 b' Can rebase onto conflicting changes insi'
69 76 $ echo modified3 > inside/f1
70 77 $ hg resolve -m 2>&1 | grep -v continue:
71 78 (no more unresolved files)
72 $ hg rebase --continue
79 $ hg continue
73 80 rebasing 6:cdce97fbf653 "conflicting inside/f1" (tip)
74 81 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-rebase.hg (glob)
75 82
@@ -1,4 +1,5 b''
1 1 #testcases abortcommand abortflag
2 #testcases continuecommand continueflag
2 3
3 4 $ cat >> $HGRCPATH <<EOF
4 5 > [extensions]
@@ -18,6 +19,13 b''
18 19 > EOF
19 20 #endif
20 21
22 #if continueflag
23 $ cat >> $HGRCPATH <<EOF
24 > [alias]
25 > continue = rebase --continue
26 > EOF
27 #endif
28
21 29 $ hg init a
22 30 $ cd a
23 31
@@ -162,7 +170,7 b' earlier than 2.7 by renaming ".hg/rebase'
162 170 $ hg --config extensions.mq= strip --quiet "destination()"
163 171 $ mv .hg/rebasestate.back .hg/rebasestate
164 172
165 $ hg rebase --continue
173 $ hg continue
166 174 abort: cannot continue inconsistent rebase
167 175 (use "hg rebase --abort" to clear broken state)
168 176 [255]
@@ -1,3 +1,4 b''
1 #testcases continuecommand continueflag
1 2 Test rebase --continue with rebasestate written by legacy client
2 3
3 4 $ cat >> $HGRCPATH <<EOF
@@ -6,6 +7,13 b' Test rebase --continue with rebasestate '
6 7 > drawdag=$TESTDIR/drawdag.py
7 8 > EOF
8 9
10 #if continueflag
11 $ cat >> $HGRCPATH <<EOF
12 > [alias]
13 > continue = rebase --continue
14 > EOF
15 #endif
16
9 17 $ hg init
10 18 $ hg debugdrawdag <<'EOF'
11 19 > D H
@@ -40,7 +48,12 b' rebasestate generated by a legacy client'
40 48 > 6582e6951a9c48c236f746f186378e36f59f4928:0000000000000000000000000000000000000000
41 49 > EOF
42 50
43 $ hg rebase --continue
51 #if continuecommand
52 $ hg continue --dry-run
53 rebase in progress, will be resumed
54 #endif
55
56 $ hg continue
44 57 rebasing 4:c1e6b162678d "B" (B)
45 58 rebasing 8:6f7a236de685 "D" (D)
46 59 rebasing 2:de008c61a447 "E" (E)
@@ -1,3 +1,4 b''
1 #testcases continuecommand continueflag
1 2 This emulates the effects of an hg pull --rebase in which the remote repo
2 3 already has one local mq patch
3 4
@@ -13,6 +14,12 b' already has one local mq patch'
13 14 > tglog = log -G --template "{rev}: {node|short} '{desc}' tags: {tags}\n"
14 15 > EOF
15 16
17 #if continueflag
18 $ cat >> $HGRCPATH <<EOF
19 > [alias]
20 > continue = rebase --continue
21 > EOF
22 #endif
16 23
17 24 $ hg init a
18 25 $ cd a
@@ -155,7 +162,7 b' already has one local mq patch'
155 162 (no more unresolved files)
156 163 continue: hg rebase --continue
157 164
158 $ hg rebase --continue
165 $ hg continue
159 166 already rebased 1:b4bffa6e4776 "r1" (qbase r1) as 057f55ff8f44
160 167 already rebased 2:c0fd129beb01 "r2" (r2) as 1660ab13ce9a
161 168 already rebased 3:6ff5b8feed8e "r3" (r3) as 1660ab13ce9a
@@ -1,3 +1,4 b''
1 #testcases continuecommand continueflag
1 2 Rebasing using a single transaction
2 3
3 4 $ cat >> $HGRCPATH <<EOF
@@ -15,6 +16,13 b' Rebasing using a single transaction'
15 16 > tglog = log -G --template "{rev}: {desc}"
16 17 > EOF
17 18
19 #if continueflag
20 $ cat >> $HGRCPATH <<EOF
21 > [alias]
22 > continue = rebase --continue
23 > EOF
24 #endif
25
18 26 Check that a simple rebase works
19 27
20 28 $ hg init simple && cd simple
@@ -123,7 +131,7 b' continued'
123 131 $ hg resolve -m
124 132 (no more unresolved files)
125 133 continue: hg rebase --continue
126 $ hg rebase --continue
134 $ hg continue
127 135 already rebased 1:112478962961 "B" (B) as 79bc8f4973ce
128 136 rebasing 3:c26739dbe603 "C" (C)
129 137 rebasing 5:d24bb333861c "D" (D tip)
@@ -177,7 +185,7 b' rebase can then be continued'
177 185 |/
178 186 o 0: A
179 187
180 $ hg rebase --continue
188 $ hg continue
181 189 rebasing 1:112478962961 "B" (B)
182 190 rebasing 3:26805aba1e60 "C" (C)
183 191 rebasing 5:f585351a92f8 "D" (D tip)
General Comments 0
You need to be logged in to leave comments. Login now