##// END OF EJS Templates
rebase: ignore negative state when updating back to original wc parent...
Pierre-Yves David -
r23440:57d35d3c stable
parent child Browse files
Show More
@@ -449,6 +449,9 b' def rebase(ui, repo, **opts):'
449 # restore original working directory
449 # restore original working directory
450 # (we do this before stripping)
450 # (we do this before stripping)
451 newwd = state.get(originalwd, originalwd)
451 newwd = state.get(originalwd, originalwd)
452 if newwd < 0:
453 # original directory is a parent of rebase set root or ignored
454 newwd = originalwd
452 if newwd not in [c.rev() for c in repo[None].parents()]:
455 if newwd not in [c.rev() for c in repo[None].parents()]:
453 ui.note(_("update back to initial working directory parent\n"))
456 ui.note(_("update back to initial working directory parent\n"))
454 hg.updaterepo(repo, newwd, False)
457 hg.updaterepo(repo, newwd, False)
@@ -300,8 +300,12 b' Check rebasing public changeset'
300
300
301 Check rebasing mutable changeset
301 Check rebasing mutable changeset
302 Source phase greater or equal to destination phase: new changeset get the phase of source:
302 Source phase greater or equal to destination phase: new changeset get the phase of source:
303 $ hg id -n
304 5
303 $ hg rebase -s9 -d0
305 $ hg rebase -s9 -d0
304 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-backup.hg (glob)
306 saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-backup.hg (glob)
307 $ hg id -n # check we updated back to parent
308 5
305 $ hg log --template "{phase}\n" -r 9
309 $ hg log --template "{phase}\n" -r 9
306 draft
310 draft
307 $ hg rebase -s9 -d1
311 $ hg rebase -s9 -d1
General Comments 0
You need to be logged in to leave comments. Login now