Mercurial > public > mercurial-scm > hg-stable
diff hgext/graphlog.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 | 9bbac962f4dd |
children | 253bda94372e |
line wrap: on
line diff
--- a/hgext/graphlog.py Fri May 13 12:57:27 2011 -0500 +++ b/hgext/graphlog.py Fri May 13 14:06:28 2011 -0500 @@ -12,11 +12,11 @@ revision graph is also shown. ''' -from mercurial.cmdutil import revrange, show_changeset +from mercurial.cmdutil import show_changeset from mercurial.commands import templateopts from mercurial.i18n import _ from mercurial.node import nullrev -from mercurial import cmdutil, commands, extensions +from mercurial import cmdutil, commands, extensions, scmutil from mercurial import hg, util, graphmod cmdtable = {} @@ -227,7 +227,7 @@ def get_revs(repo, rev_opt): if rev_opt: - revs = revrange(repo, rev_opt) + revs = scmutil.revrange(repo, rev_opt) if len(revs) == 0: return (nullrev, nullrev) return (max(revs), min(revs)) @@ -324,7 +324,7 @@ check_unsupported_flags(pats, opts) - revs = sorted(revrange(repo, [revset(pats, opts)]), reverse=1) + revs = sorted(scmutil.revrange(repo, [revset(pats, opts)]), reverse=1) limit = cmdutil.loglimit(opts) if limit is not None: revs = revs[:limit]