Patchwork [4,of,7] histedit: remove "name" parameter from cleanupnode functions

login
register
mail settings
Submitter Jun Wu
Date July 8, 2017, 11:51 p.m.
Message ID <d1b9eb1ad8ac5f9e6453.1499557892@x1c>
Download mbox | patch
Permalink /patch/22140/
State Accepted
Headers show

Comments

Jun Wu - July 8, 2017, 11:51 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1499557831 25200
#      Sat Jul 08 16:50:31 2017 -0700
# Node ID d1b9eb1ad8ac5f9e645337034594862e1ba37092
# Parent  e7e252fc902cb8bde126a05557e6f744dd10e8db
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r d1b9eb1ad8ac
histedit: remove "name" parameter from cleanupnode functions

The "name" parameter is not used any longer so let's remove it.

Patch

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -1172,5 +1172,5 @@  def _finishhistedit(ui, repo, state):
                         ui.debug(m % node.short(n))
 
-    safecleanupnode(ui, repo, 'temp', tmpnodes)
+    safecleanupnode(ui, repo, tmpnodes)
 
     if not state.keep:
@@ -1178,5 +1178,5 @@  def _finishhistedit(ui, repo, state):
             movebookmarks(ui, repo, mapping, state.topmost, ntm)
             # TODO update mq state
-        safecleanupnode(ui, repo, 'replaced', mapping)
+        safecleanupnode(ui, repo, mapping)
 
     state.clear()
@@ -1208,6 +1208,6 @@  def _aborthistedit(ui, repo, state):
                                 state.parentctxnode, leafs | tmpnodes):
             hg.clean(repo, state.topmost, show_stats=True, quietempty=True)
-        cleanupnode(ui, repo, 'created', tmpnodes)
-        cleanupnode(ui, repo, 'temp', leafs)
+        cleanupnode(ui, repo, tmpnodes)
+        cleanupnode(ui, repo, leafs)
     except Exception:
         if state.inprogress():
@@ -1590,5 +1590,5 @@  def movebookmarks(ui, repo, mapping, old
             release(tr, lock)
 
-def cleanupnode(ui, repo, name, nodes):
+def cleanupnode(ui, repo, nodes):
     """strip a group of nodes from the repository
 
@@ -1610,5 +1610,5 @@  def cleanupnode(ui, repo, name, nodes):
             repair.strip(ui, repo, c)
 
-def safecleanupnode(ui, repo, name, nodes):
+def safecleanupnode(ui, repo, nodes):
     """strip or obsolete nodes
 
@@ -1636,5 +1636,5 @@  def safecleanupnode(ui, repo, name, node
             obsolete.createmarkers(repo, markers, operation='histedit')
     else:
-        return cleanupnode(ui, repo, name, nodes)
+        return cleanupnode(ui, repo, nodes)
 
 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs):