Patchwork [2,of,4,v2] rebase: always store rev in state, also when collapsing

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 2, 2014, 4:13 a.m.
Message ID <9a8d248290a4e634a6bd.1417493627@localhost.localdomain>
Download mbox | patch
Permalink /patch/6938/
State Accepted
Commit 8dc45c905989891b0cc075809344268427b95e92
Headers show

Comments

Mads Kiilerich - Dec. 2, 2014, 4:13 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1417493579 -3600
#      Tue Dec 02 05:12:59 2014 +0100
# Node ID 9a8d248290a4e634a6bdc0a1d07514fe8e971ad9
# Parent  c0ba4e6ab242472c211f7233e14da65db855061a
rebase: always store rev in state, also when collapsing

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -429,9 +429,13 @@  def rebase(ui, repo, **opts):
             editor = cmdutil.getcommiteditor(edit=editopt, editform=editform)
             newnode = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
                                    extrafn=extrafn, editor=editor)
+            if newnode is None:
+                newrev = target
+            else:
+                newrev = repo[newnode].rev()
             for oldrev in state.iterkeys():
                 if state[oldrev] > nullmerge:
-                    state[oldrev] = newnode
+                    state[oldrev] = newrev
 
         if 'qtip' in repo.tags():
             updatemq(repo, state, skipped, **opts)