Patchwork [4,of,4] revset: delete _updatedefaultdest as it has no users

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 7, 2015, 7:02 p.m.
Message ID <1383a77759ffed85c97b.1444244544@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/10865/
State Superseded
Commit a024e2db4553492e173032f52464e2c4efe0d4fa
Headers show

Comments

Pierre-Yves David - Oct. 7, 2015, 7:02 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1444037625 25200
#      Mon Oct 05 02:33:45 2015 -0700
# Node ID 1383a77759ffed85c97bfc92b4d20d0180292546
# Parent  224f781d36bdfa50e8db7a3e02d5398848a88b20
revset: delete _updatedefaultdest as it has no users

The revset is not used anywhere anymore. We delete the function until we use
(and therefore test it again).

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -522,22 +522,10 @@  def _mergedefaultdest(repo, subset, x):
             node = nbhs[-1]
         else:
             node = nbhs[0]
     return subset & baseset([repo[node].rev()])
 
-def _updatedefaultdest(repo, subset, x):
-    # ``_updatedefaultdest()``
-
-    # default destination for update.
-    # # XXX: Currently private because I expect the signature to change.
-    # # XXX: - taking rev as arguments,
-    # # XXX: - bailing out in case of ambiguity vs returning all data.
-    getargs(x, 0, 0, _("_updatedefaultdest takes no arguments"))
-    from .scmutil import destupdate # avoiding cycle
-    rev = destupdate(repo)
-    return subset & baseset([rev])
-
 def adds(repo, subset, x):
     """``adds(pattern)``
     Changesets that add a file matching pattern.
 
     The pattern without explicit kind like ``glob:`` is expected to be
@@ -2141,11 +2129,10 @@  def _hexlist(repo, subset, x):
     s = subset
     return baseset([r for r in ls if r in s])
 
 symbols = {
     "_mergedefaultdest": _mergedefaultdest,
-    "_updatedefaultdest": _updatedefaultdest,
     "adds": adds,
     "all": getall,
     "ancestor": ancestor,
     "ancestors": ancestors,
     "_firstancestors": _firstancestors,