comparison mercurial/cmdutil.py @ 3822:000d122071b5

fix hg diff -r ''
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 07 Dec 2006 14:15:11 -0200
parents 120be84f33de
children 3674ca805a5b
comparison
equal deleted inserted replaced
3821:2631b506e93d 3822:000d122071b5
16 def revpair(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 and defval is not None:
22 val = defval 22 val = defval
23 return repo.lookup(val) 23 return repo.lookup(val)
24 24
25 if not revs: 25 if not revs:
26 return repo.dirstate.parents()[0], None 26 return repo.dirstate.parents()[0], None