comparison hglib/context.py @ 138:a05cdc1579df 1.5

context: handle tip+1 breakage in pre-3.2 default branch Asking for rev(tip+1) could give a null changeset, which broke tests.
author Matt Mackall <mpm@selenic.com>
date Sat, 01 Nov 2014 14:28:56 -0500
parents 7ba67c1f1f92
children fe74d5599539
comparison
equal deleted inserted replaced
137:7ba67c1f1f92 138:a05cdc1579df
21 changeid = 'rev(%d)' % changeid 21 changeid = 'rev(%d)' % changeid
22 22
23 notfound = False 23 notfound = False
24 try: 24 try:
25 cset = self._repo.log(changeid) 25 cset = self._repo.log(changeid)
26 # hg bbf4f3dfd700 gave a null result for tip+1
27 if (cset and cset[0][1] == _nullcset[1]
28 and cset[0][0] != _nullcset[0]):
29 notfound = True
26 except CommandError: 30 except CommandError:
27 notfound = True 31 notfound = True
28 32
29 if notfound or not len(cset): 33 if notfound or not len(cset):
30 raise ValueError('changeid %r not found in repo' % changeid) 34 raise ValueError('changeid %r not found in repo' % changeid)