Patchwork [1,of,2] hgext: updated extensions to return a baseset when adding symbols

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 11, 2014, 5:52 p.m.
Message ID <daa72c03125908e686e6.1392141168@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3567/
State Accepted
Commit 8524cdf66a12b644f24d9726cc641f2a7aefdb8d
Headers show

Comments

Lucas Moscovicz - Feb. 11, 2014, 5:52 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1392138038 28800
#      Tue Feb 11 09:00:38 2014 -0800
# Node ID daa72c03125908e686e6854c8141f3e584128ea4
# Parent  ecb4171110b4f2a9df166ec4a3087ded6577f857
hgext: updated extensions to return a baseset when adding symbols

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -12,7 +12,7 @@ 
 import copy
 
 from mercurial import hg, commands, util, cmdutil, scmutil, match as match_, \
-    node, archival, error, merge, discovery, pathutil
+        node, archival, error, merge, discovery, pathutil, revset
 from mercurial.i18n import _
 from mercurial.node import hex
 from hgext import rebase
@@ -752,7 +752,7 @@ 
         firstpulled = repo.firstpulled
     except AttributeError:
         raise util.Abort(_("pulled() only available in --lfrev"))
-    return [r for r in subset if r >= firstpulled]
+    return revset.baseset([r for r in subset if r >= firstpulled])
 
 def overrideclone(orig, ui, source, dest=None, **opts):
     d = dest
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -3407,7 +3407,7 @@ 
     """
     revset.getargs(x, 0, 0, _("mq takes no arguments"))
     applied = set([repo[r.node].rev() for r in repo.mq.applied])
-    return [r for r in subset if r in applied]
+    return revset.baseset([r for r in subset if r in applied])
 
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = [revsetmq]
diff --git a/hgext/transplant.py b/hgext/transplant.py
--- a/hgext/transplant.py
+++ b/hgext/transplant.py
@@ -670,7 +670,8 @@ 
         s = revset.getset(repo, subset, x)
     else:
         s = subset
-    return [r for r in s if repo[r].extra().get('transplant_source')]
+    return revset.baseset([r for r in s if
+        repo[r].extra().get('transplant_source')])
 
 def kwtransplanted(repo, ctx, **args):
     """:transplanted: String. The node identifier of the transplanted