diff hgext/transplant.py @ 14319:b33f3e35efb0

scmutil: move revsingle/pair/range from cmdutil This allows users at levels below the command layer to avoid import loops.
author Matt Mackall <mpm@selenic.com>
date Fri, 13 May 2011 14:06:28 -0500
parents e7ea3e38fea8
children 2d16f15da7bd
line wrap: on
line diff
--- a/hgext/transplant.py	Fri May 13 12:57:27 2011 -0500
+++ b/hgext/transplant.py	Fri May 13 14:06:28 2011 -0500
@@ -15,8 +15,8 @@
 
 from mercurial.i18n import _
 import os, tempfile
-from mercurial import bundlerepo, cmdutil, hg, merge, match
-from mercurial import patch, revlog, scmutil, util, error
+from mercurial import bundlerepo, hg, merge, match
+from mercurial import patch, revlog, scmutil, util, error, cmdutil
 from mercurial import revset, templatekw
 
 cmdtable = {}
@@ -578,14 +578,14 @@
         tf = tp.transplantfilter(repo, source, p1)
         if opts.get('prune'):
             prune = [source.lookup(r)
-                     for r in cmdutil.revrange(source, opts.get('prune'))]
+                     for r in scmutil.revrange(source, opts.get('prune'))]
             matchfn = lambda x: tf(x) and x not in prune
         else:
             matchfn = tf
         merges = map(source.lookup, opts.get('merge', ()))
         revmap = {}
         if revs:
-            for r in cmdutil.revrange(source, revs):
+            for r in scmutil.revrange(source, revs):
                 revmap[int(r)] = source.lookup(r)
         elif opts.get('all') or not merges:
             if source != repo: