hgext/shelve.py
changeset 22844 1533e642262d
parent 22684 73d7de6f9b47
parent 22842 d43d116a118c
child 22898 43816070284e
--- a/hgext/shelve.py	Wed Oct 08 14:16:53 2014 -0700
+++ b/hgext/shelve.py	Fri Oct 10 12:15:46 2014 -0500
@@ -449,10 +449,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=False, topic='shelve')
         shelvedstate.clear(repo)
         unshelvecleanup(ui, repo, state.name, opts)