Mercurial > public > mercurial-scm > hg
comparison hgext/extdiff.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 | df2399663392 |
children | a90131b85fd8 |
comparison
equal
deleted
inserted
replaced
14318:1f46be4689ed | 14319:b33f3e35efb0 |
---|---|
121 | 121 |
122 if revs and change: | 122 if revs and change: |
123 msg = _('cannot specify --rev and --change at the same time') | 123 msg = _('cannot specify --rev and --change at the same time') |
124 raise util.Abort(msg) | 124 raise util.Abort(msg) |
125 elif change: | 125 elif change: |
126 node2 = cmdutil.revsingle(repo, change, None).node() | 126 node2 = scmutil.revsingle(repo, change, None).node() |
127 node1a, node1b = repo.changelog.parents(node2) | 127 node1a, node1b = repo.changelog.parents(node2) |
128 else: | 128 else: |
129 node1a, node2 = cmdutil.revpair(repo, revs) | 129 node1a, node2 = scmutil.revpair(repo, revs) |
130 if not revs: | 130 if not revs: |
131 node1b = repo.dirstate.p2() | 131 node1b = repo.dirstate.p2() |
132 else: | 132 else: |
133 node1b = nullid | 133 node1b = nullid |
134 | 134 |