comparison hgext/graphlog.py @ 13971:bfeaa88b875d

move canonpath from util to scmutil
author Adrian Buehlmann <adrian@cadifra.com>
date Wed, 20 Apr 2011 21:41:41 +0200
parents 12f60626d817
children 9966c95b8c4f
comparison
equal deleted inserted replaced
13970:d13913355390 13971:bfeaa88b875d
16 from mercurial.cmdutil import revrange, show_changeset 16 from mercurial.cmdutil import revrange, show_changeset
17 from mercurial.commands import templateopts 17 from mercurial.commands import templateopts
18 from mercurial.i18n import _ 18 from mercurial.i18n import _
19 from mercurial.node import nullrev 19 from mercurial.node import nullrev
20 from mercurial import cmdutil, commands, extensions 20 from mercurial import cmdutil, commands, extensions
21 from mercurial import hg, util, graphmod 21 from mercurial import hg, scmutil, util, graphmod
22 22
23 ASCIIDATA = 'ASC' 23 ASCIIDATA = 'ASC'
24 24
25 def asciiedges(seen, rev, parents): 25 def asciiedges(seen, rev, parents):
26 """adds edge info to changelog DAG walk suitable for ascii()""" 26 """adds edge info to changelog DAG walk suitable for ascii()"""
248 start, stop = get_revs(repo, opts["rev"]) 248 start, stop = get_revs(repo, opts["rev"])
249 if start == nullrev: 249 if start == nullrev:
250 return 250 return
251 251
252 if path: 252 if path:
253 path = util.canonpath(repo.root, os.getcwd(), path) 253 path = scmutil.canonpath(repo.root, os.getcwd(), path)
254 if path: # could be reset in canonpath 254 if path: # could be reset in canonpath
255 revdag = graphmod.filerevs(repo, path, start, stop, limit) 255 revdag = graphmod.filerevs(repo, path, start, stop, limit)
256 else: 256 else:
257 if limit is not None: 257 if limit is not None:
258 stop = max(stop, start - limit + 1) 258 stop = max(stop, start - limit + 1)