Mercurial > hg-stable
changeset 3707:67f44b825784
Removed unused ui parameter from revpair/revrange and fix its users.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 22 Nov 2006 23:02:28 +0100 |
parents | 0d810798acb1 |
children | 1debe70db9d7 |
files | hgext/extdiff.py hgext/mq.py mercurial/cmdutil.py mercurial/commands.py |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/extdiff.py Wed Nov 22 22:33:57 2006 +0100 +++ b/hgext/extdiff.py Wed Nov 22 23:02:28 2006 +0100 @@ -99,7 +99,7 @@ fp.write(chunk) return dirname - node1, node2 = cmdutil.revpair(ui, repo, opts['rev']) + node1, node2 = cmdutil.revpair(repo, opts['rev']) files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) modified, added, removed, deleted, unknown = repo.status( node1, node2, files, match=matchfn)[:5]
--- a/hgext/mq.py Wed Nov 22 22:33:57 2006 +0100 +++ b/hgext/mq.py Wed Nov 22 23:02:28 2006 +0100 @@ -33,7 +33,7 @@ from mercurial.i18n import gettext as _ from mercurial import commands demandload(globals(), "os sys re struct traceback errno bz2") -demandload(globals(), "mercurial:cmdutil,hg,patch,revlog,ui,util") +demandload(globals(), "mercurial:cmdutil,hg,patch,revlog,util") commands.norepo += " qclone qversion" @@ -502,7 +502,7 @@ if opts.get('rev'): if not self.applied: raise util.Abort(_('no patches applied')) - revs = cmdutil.revrange(ui, repo, opts['rev']) + revs = cmdutil.revrange(repo, opts['rev']) if len(revs) > 1 and revs[0] > revs[1]: revs.reverse() for rev in revs: @@ -1315,7 +1315,7 @@ if files: raise util.Abort(_('option "-r" not valid when importing ' 'files')) - rev = cmdutil.revrange(self.ui, repo, rev) + rev = cmdutil.revrange(repo, rev) rev.sort(lambda x, y: cmp(y, x)) if (len(files) > 1 or len(rev) > 1) and patchname: raise util.Abort(_('option "-n" not valid when importing multiple '
--- a/mercurial/cmdutil.py Wed Nov 22 22:33:57 2006 +0100 +++ b/mercurial/cmdutil.py Wed Nov 22 23:02:28 2006 +0100 @@ -13,7 +13,7 @@ revrangesep = ':' -def revpair(ui, repo, revs): +def revpair(repo, revs): '''return pair of nodes, given list of revisions. second item can be None, meaning use working dir.''' @@ -41,7 +41,7 @@ raise util.Abort(_('too many revisions specified')) return start, end -def revrange(ui, repo, revs): +def revrange(repo, revs): """Yield revision as strings from a list of revision specifications.""" def revfix(repo, val, defval): @@ -641,7 +641,7 @@ defrange = '%s:0' % repo.changectx().rev() else: defrange = 'tip:0' - revs = revrange(ui, repo, opts['rev'] or [defrange]) + revs = revrange(repo, opts['rev'] or [defrange]) wanted = {} slowpath = anypats or opts.get('removed') fncache = {}
--- a/mercurial/commands.py Wed Nov 22 22:33:57 2006 +0100 +++ b/mercurial/commands.py Wed Nov 22 23:02:28 2006 +0100 @@ -835,7 +835,7 @@ it detects as binary. With -a, diff will generate a diff anyway, probably with undesirable results. """ - node1, node2 = cmdutil.revpair(ui, repo, opts['rev']) + node1, node2 = cmdutil.revpair(repo, opts['rev']) fns, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) @@ -871,7 +871,7 @@ """ if not changesets: raise util.Abort(_("export requires at least one changeset")) - revs = cmdutil.revrange(ui, repo, changesets) + revs = cmdutil.revrange(repo, changesets) if len(revs) > 1: ui.note(_('exporting patches:\n')) else: @@ -1436,7 +1436,7 @@ count = 0 if opts['copies'] and opts['rev']: - endrev = max(cmdutil.revrange(ui, repo, opts['rev'])) + 1 + endrev = max(cmdutil.revrange(repo, opts['rev'])) + 1 else: endrev = repo.changelog.count() rcache = {} @@ -2120,7 +2120,7 @@ """ all = opts['all'] - node1, node2 = cmdutil.revpair(ui, repo, opts.get('rev')) + node1, node2 = cmdutil.revpair(repo, opts.get('rev')) files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) cwd = (pats and repo.getcwd()) or ''