Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 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 | eb0b4a2d70a9 |
children | 7db88b094b14 |
comparison
equal
deleted
inserted
replaced
3706:0d810798acb1 | 3707:67f44b825784 |
---|---|
11 demandload(globals(), 'os sys') | 11 demandload(globals(), 'os sys') |
12 demandload(globals(), 'mdiff util templater cStringIO patch') | 12 demandload(globals(), 'mdiff util templater cStringIO patch') |
13 | 13 |
14 revrangesep = ':' | 14 revrangesep = ':' |
15 | 15 |
16 def revpair(ui, repo, revs): | 16 def revpair(repo, revs): |
17 '''return pair of nodes, given list of revisions. second item can | 17 '''return pair of nodes, given list of revisions. second item can |
18 be None, meaning use working dir.''' | 18 be None, meaning use working dir.''' |
19 | 19 |
20 def revfix(repo, val, defval): | 20 def revfix(repo, val, defval): |
21 if not val and val != 0: | 21 if not val and val != 0: |
39 end = revfix(repo, revs[1], None) | 39 end = revfix(repo, revs[1], None) |
40 else: | 40 else: |
41 raise util.Abort(_('too many revisions specified')) | 41 raise util.Abort(_('too many revisions specified')) |
42 return start, end | 42 return start, end |
43 | 43 |
44 def revrange(ui, repo, revs): | 44 def revrange(repo, revs): |
45 """Yield revision as strings from a list of revision specifications.""" | 45 """Yield revision as strings from a list of revision specifications.""" |
46 | 46 |
47 def revfix(repo, val, defval): | 47 def revfix(repo, val, defval): |
48 if not val and val != 0: | 48 if not val and val != 0: |
49 return defval | 49 return defval |
639 | 639 |
640 if follow: | 640 if follow: |
641 defrange = '%s:0' % repo.changectx().rev() | 641 defrange = '%s:0' % repo.changectx().rev() |
642 else: | 642 else: |
643 defrange = 'tip:0' | 643 defrange = 'tip:0' |
644 revs = revrange(ui, repo, opts['rev'] or [defrange]) | 644 revs = revrange(repo, opts['rev'] or [defrange]) |
645 wanted = {} | 645 wanted = {} |
646 slowpath = anypats or opts.get('removed') | 646 slowpath = anypats or opts.get('removed') |
647 fncache = {} | 647 fncache = {} |
648 | 648 |
649 if not slowpath and not files: | 649 if not slowpath and not files: |