hgext/shelve.py
branchstable
changeset 22842 d43d116a118c
parent 21852 37a5decc6924
child 22844 1533e642262d
--- a/hgext/shelve.py	Wed Oct 01 14:59:33 2014 -0500
+++ b/hgext/shelve.py	Wed Oct 08 07:47:11 2014 -0400
@@ -453,10 +453,12 @@
         if not shelvectx in state.pendingctx.children():
             # rebase was a no-op, so it produced no child commit
             shelvectx = state.pendingctx
+        else:
+            # only strip the shelvectx if the rebase produced it
+            state.stripnodes.append(shelvectx.node())
 
         mergefiles(ui, repo, state.wctx, shelvectx)
 
-        state.stripnodes.append(shelvectx.node())
         repair.strip(ui, repo, state.stripnodes, backup='none', topic='shelve')
         shelvedstate.clear(repo)
         unshelvecleanup(ui, repo, state.name, opts)