--- a/mercurial/cmdutil.py Fri May 13 14:07:16 2011 -0500
+++ b/mercurial/cmdutil.py Fri May 13 14:48:48 2011 -0500
@@ -12,12 +12,9 @@
import match as matchmod
import subrepo
-expandpats = scmutil.expandpats
match = scmutil.match
matchall = scmutil.matchall
matchfiles = scmutil.matchfiles
-addremove = scmutil.addremove
-dirstatecopy = scmutil.dirstatecopy
def parsealiases(cmd):
return cmd.lstrip("^").split("|")
@@ -270,7 +267,8 @@
targets[abstarget] = abssrc
# fix up dirstate
- dirstatecopy(ui, repo, wctx, abssrc, abstarget, dryrun=dryrun, cwd=cwd)
+ scmutil.dirstatecopy(ui, repo, wctx, abssrc, abstarget,
+ dryrun=dryrun, cwd=cwd)
if rename and not dryrun:
wctx.remove([abssrc], not after)
@@ -341,7 +339,7 @@
return res
- pats = expandpats(pats)
+ pats = scmutil.expandpats(pats)
if not pats:
raise util.Abort(_('no source or destination specified'))
if len(pats) == 1:
@@ -1135,7 +1133,7 @@
# extract addremove carefully -- this function can be called from a command
# that doesn't support addremove
if opts.get('addremove'):
- addremove(repo, pats, opts)
+ scmutil.addremove(repo, pats, opts)
return commitfunc(ui, repo, message, match(repo, pats, opts), opts)
--- a/mercurial/commands.py Fri May 13 14:07:16 2011 -0500
+++ b/mercurial/commands.py Fri May 13 14:48:48 2011 -0500
@@ -195,7 +195,7 @@
raise util.Abort(_('similarity must be a number'))
if sim < 0 or sim > 100:
raise util.Abort(_('similarity must be between 0 and 100'))
- return cmdutil.addremove(repo, pats, opts, similarity=sim / 100.0)
+ return scmutil.addremove(repo, pats, opts, similarity=sim / 100.0)
@command('^annotate|blame',
[('r', 'rev', '', _('annotate the specified revision'), _('REV')),
--- a/mercurial/patch.py Fri May 13 14:07:16 2011 -0500
+++ b/mercurial/patch.py Fri May 13 14:48:48 2011 -0500
@@ -11,7 +11,7 @@
from i18n import _
from node import hex, nullid, short
-import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, wdutil
+import base85, mdiff, scmutil, util, diffhelpers, copies, encoding
gitre = re.compile('diff --git a/(.*) b/(.*)')
@@ -1181,7 +1181,7 @@
wctx = repo[None]
for src, dst in copies:
- wdutil.dirstatecopy(ui, repo, wctx, src, dst, cwd=cwd)
+ scmutil.dirstatecopy(ui, repo, wctx, src, dst, cwd=cwd)
if (not similarity) and removes:
wctx.remove(sorted(removes), True)
@@ -1195,7 +1195,7 @@
flags = (isexec and 'x' or '') + (islink and 'l' or '')
repo.wwrite(gp.path, '', flags)
util.setflags(dst, islink, isexec)
- wdutil.addremove(repo, cfiles, similarity=similarity)
+ scmutil.addremove(repo, cfiles, similarity=similarity)
files = patches.keys()
files.extend([r for r in removes if r not in files])
return sorted(files)