Patchwork [4,of,5] histedit: also update away from tmpnodes

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 3, 2015, 9:25 p.m.
Message ID <ec0875fa682acd025a41.1438637126@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/10097/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 3, 2015, 9:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1438607505 25200
#      Mon Aug 03 06:11:45 2015 -0700
# Node ID ec0875fa682acd025a41471438c64041a37a2f82
# Parent  d98266ffb5d74c85409c9fb694bbb78295863801
histedit: also update away from tmpnodes

The working copy may be on a tmpnodes, we need to update away before it is
stripped from the repository.

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -790,11 +790,11 @@  def _histedit(ui, repo, state, *freeargs
                                        'bundle:' + backupfile)
             os.remove(backupfile)
 
         # check whether we should update away
         if repo.unfiltered().revs('parents() and (%n  or %ln)',
-                                  state.parentctxnode, leafs):
+                                  state.parentctxnode, leafs | tmpnodes):
             hg.clean(repo, state.topmost)
         cleanupnode(ui, repo, 'created', tmpnodes)
         cleanupnode(ui, repo, 'temp', leafs)
         state.clear()
         return