Patchwork [2,of,6] destutil: drop now-unused "check" parameter from destupdate()

login
register
mail settings
Submitter via Mercurial-devel
Date Feb. 14, 2017, 1:07 a.m.
Message ID <dcd80a611a62f29b5c21.1487034439@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/18461/
State Superseded
Headers show

Comments

via Mercurial-devel - Feb. 14, 2017, 1:07 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1487014329 28800
#      Mon Feb 13 11:32:09 2017 -0800
# Node ID dcd80a611a62f29b5c2130fe258ee305f7f6cab0
# Parent  f261eed3d3080b00a25fd4f422966b40c44fceb6
destutil: drop now-unused "check" parameter from destupdate()

Patch

diff -r f261eed3d308 -r dcd80a611a62 mercurial/destutil.py
--- a/mercurial/destutil.py	Thu Feb 09 09:52:32 2017 -0800
+++ b/mercurial/destutil.py	Mon Feb 13 11:32:09 2017 -0800
@@ -14,7 +14,7 @@ 
     obsolete,
 )
 
-def _destupdateobs(repo, clean, check):
+def _destupdateobs(repo, clean):
     """decide of an update destination from obsolescence markers"""
     node = None
     wc = repo[None]
@@ -50,7 +50,7 @@ 
                 movemark = repo['.'].node()
     return node, movemark, None
 
-def _destupdatebook(repo, clean, check):
+def _destupdatebook(repo, clean):
     """decide on an update destination from active bookmark"""
     # we also move the active bookmark, if any
     activemark = None
@@ -59,7 +59,7 @@ 
         activemark = node
     return node, movemark, activemark
 
-def _destupdatebranch(repo, clean, check):
+def _destupdatebranch(repo, clean):
     """decide on an update destination from current branch
 
     This ignores closed branch heads.
@@ -85,7 +85,7 @@ 
         node = repo['.'].node()
     return node, movemark, None
 
-def _destupdatebranchfallback(repo, clean, check):
+def _destupdatebranchfallback(repo, clean):
     """decide on an update destination from closed heads in current branch"""
     wc = repo[None]
     currentbranch = wc.branch()
@@ -115,7 +115,7 @@ 
                      'branchfallback': _destupdatebranchfallback,
                      }
 
-def destupdate(repo, clean=False, check=False):
+def destupdate(repo, clean=False):
     """destination for bare update operation
 
     return (rev, movemark, activemark)
@@ -128,7 +128,7 @@ 
     node = movemark = activemark = None
 
     for step in destupdatesteps:
-        node, movemark, activemark = destupdatestepmap[step](repo, clean, check)
+        node, movemark, activemark = destupdatestepmap[step](repo, clean)
         if node is not None:
             break
     rev = repo[node].rev()
diff -r f261eed3d308 -r dcd80a611a62 mercurial/hg.py
--- a/mercurial/hg.py	Thu Feb 09 09:52:32 2017 -0800
+++ b/mercurial/hg.py	Mon Feb 13 11:32:09 2017 -0800
@@ -732,7 +732,7 @@ 
         movemarkfrom = None
         warndest = False
         if checkout is None:
-            updata = destutil.destupdate(repo, clean=clean, check=check)
+            updata = destutil.destupdate(repo, clean=clean)
             checkout, movemarkfrom, brev = updata
             warndest = True
 
diff -r f261eed3d308 -r dcd80a611a62 mercurial/revset.py
--- a/mercurial/revset.py	Thu Feb 09 09:52:32 2017 -0800
+++ b/mercurial/revset.py	Mon Feb 13 11:32:09 2017 -0800
@@ -507,7 +507,7 @@ 
 @predicate('_destupdate')
 def _destupdate(repo, subset, x):
     # experimental revset for update destination
-    args = getargsdict(x, 'limit', 'clean check')
+    args = getargsdict(x, 'limit', 'clean')
     return subset & baseset([destutil.destupdate(repo, **args)[0]])
 
 @predicate('_destmerge')