Mercurial > public > mercurial-scm > hg
diff hgext/rebase.py @ 28015:a036e1ae1fbe
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 07 Feb 2016 00:49:31 -0600 |
parents | e862b1fd33a8 61f4d59e9a0b |
children | 41a0fb2b4bbc |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Jan 19 18:20:13 2016 +0000 +++ b/hgext/rebase.py Sun Feb 07 00:49:31 2016 -0600 @@ -980,15 +980,20 @@ cleanup = False if cleanup: + shouldupdate = False + rebased = filter(lambda x: x >= 0 and x != target, state.values()) + if rebased: + strippoints = [ + c.node() for c in repo.set('roots(%ld)', rebased)] + shouldupdate = len([ + c.node() for c in repo.set('. & (%ld)', rebased)]) > 0 + # Update away from the rebase if necessary - if needupdate(repo, state): + if shouldupdate or needupdate(repo, state): merge.update(repo, originalwd, False, True) # Strip from the first rebased revision - rebased = filter(lambda x: x >= 0 and x != target, state.values()) if rebased: - strippoints = [ - c.node() for c in repo.set('roots(%ld)', rebased)] # no backup of rebased cset versions needed repair.strip(repo.ui, repo, strippoints)