##// END OF EJS Templates
abort: added support for rebase...
Taapas Agrawal -
r42786:b9bc4721 default
parent child Browse files
Show More
@@ -1923,6 +1923,11 b' def _computeobsoletenotrebased(repo, reb'
1923 1923 obsoleteextinctsuccessors,
1924 1924 )
1925 1925
1926 def abortrebase(ui, repo):
1927 with repo.wlock(), repo.lock():
1928 rbsrt = rebaseruntime(repo, ui)
1929 rbsrt._prepareabortorcontinue(isabort=True)
1930
1926 1931 def summaryhook(ui, repo):
1927 1932 if not repo.vfs.exists('rebasestate'):
1928 1933 return
@@ -1951,4 +1956,4 b' def uisetup(ui):'
1951 1956 _("specify merge tool for rebase")))
1952 1957 cmdutil.summaryhooks.add('rebase', summaryhook)
1953 1958 statemod.addunfinished('rebase', fname='rebasestate', stopflag=True,
1954 continueflag=True)
1959 continueflag=True, abortfunc=abortrebase)
@@ -1,3 +1,5 b''
1 #testcases abortcommand abortflag
2
1 3 $ cat >> $HGRCPATH <<EOF
2 4 > [extensions]
3 5 > rebase=
@@ -9,6 +11,12 b''
9 11 > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
10 12 > EOF
11 13
14 #if abortflag
15 $ cat >> $HGRCPATH <<EOF
16 > [alias]
17 > abort = rebase --abort
18 > EOF
19 #endif
12 20
13 21 $ hg init a
14 22 $ cd a
@@ -114,7 +122,13 b' Insert unsupported mandatory merge recor'
114 122
115 123 Abort (should clear out unsupported merge state):
116 124
117 $ hg rebase --abort
125 #if abortcommand
126 when in dry-run mode
127 $ hg abort --dry-run
128 rebase in progress, will be aborted
129 #endif
130
131 $ hg abort
118 132 saved backup bundle to $TESTTMP/a/.hg/strip-backup/3e046f2ecedb-6beef7d5-backup.hg
119 133 rebase aborted
120 134 $ hg debugmergestate
@@ -154,7 +168,7 b' earlier than 2.7 by renaming ".hg/rebase'
154 168 [255]
155 169 $ hg summary | grep '^rebase: '
156 170 rebase: (use "hg rebase --abort" to clear broken state)
157 $ hg rebase --abort
171 $ hg abort
158 172 rebase aborted (no revision is removed, only broken state is cleared)
159 173
160 174 $ cd ..
@@ -271,7 +285,7 b' rebase abort should not leave working co'
271 285 warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
272 286 unresolved conflicts (see hg resolve, then hg rebase --continue)
273 287 [1]
274 $ hg rebase --abort
288 $ hg abort
275 289 rebase aborted
276 290 $ hg log -G --template "{rev} {desc} {bookmarks}"
277 291 @ 3 C foo
@@ -324,7 +338,7 b' user has somehow managed to update to a '
324 338
325 339 $ cat a
326 340 new
327 $ hg rebase --abort
341 $ hg abort
328 342 rebase aborted
329 343 $ cat a
330 344 new
@@ -405,7 +419,7 b' New operations are blocked with the corr'
405 419 (use 'hg rebase --continue' or 'hg rebase --abort')
406 420 [255]
407 421
408 $ hg rebase --abort
422 $ hg abort
409 423 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/3d8812cf300d-93041a90-backup.hg
410 424 rebase aborted
411 425 $ hg log -G --template "{rev} {desc} {bookmarks}"
@@ -456,7 +470,7 b' during a rebase (issue4661)'
456 470 rebasing 2:e4ea5cdc9789 "conflicting 1"
457 471 unresolved conflicts (see hg resolve, then hg rebase --continue)
458 472 [1]
459 $ hg rebase --abort
473 $ hg abort
460 474 rebase aborted
461 475 $ hg summary
462 476 parent: 3:b16646383533 tip
@@ -497,7 +511,7 b' commit will cause merge conflict on reba'
497 511 warning: conflicts while merging root! (edit, then use 'hg resolve --mark')
498 512 unresolved conflicts (see hg resolve, then hg rebase --continue)
499 513 [1]
500 $ hg rebase --abort
514 $ hg abort
501 515 rebase aborted
502 516 $ cd ..
503 517
General Comments 0
You need to be logged in to leave comments. Login now