# HG changeset patch # User Matt Mackall # Date 2011-05-13 19:48:48 # Node ID 003d63bb4fa572cf0061d8e03fb11272e39edd6d # Parent 3438417a66571d080eb6d9f48bbb88fa1390133b scmutil: drop some aliases in cmdutil diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -12,12 +12,9 @@ import util, scmutil, templater, patch, 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 @@ def copy(ui, repo, pats, opts, rename=Fa 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 @@ def copy(ui, repo, pats, opts, rename=Fa 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 @@ def commit(ui, repo, commitfunc, pats, o # 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) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -195,7 +195,7 @@ def addremove(ui, repo, *pats, **opts): 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')), diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -11,7 +11,7 @@ import tempfile, zlib 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 @@ def _updatedir(ui, repo, patches, simila 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 @@ def _updatedir(ui, repo, patches, simila 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)