comparison mercurial/bundlerepo.py @ 15091:106f89299da6 stable

bundlerepo: add argument check before unlink The default argument value of None, for bundlename, would cause an exception. Callers currently pass an empty string, thus dodging this problem.
author Sune Foldager <cryo@cyanite.org>
date Wed, 14 Sep 2011 13:51:50 +0200
parents 1ffeeb91c55d
children bc0778f5619a
comparison
equal deleted inserted replaced
15088:31c9e2a702d1 15091:106f89299da6
313 ''' 313 '''
314 tmp = discovery.findcommonincoming(repo, other, heads=onlyheads, force=force) 314 tmp = discovery.findcommonincoming(repo, other, heads=onlyheads, force=force)
315 common, incoming, rheads = tmp 315 common, incoming, rheads = tmp
316 if not incoming: 316 if not incoming:
317 try: 317 try:
318 os.unlink(bundlename) 318 if bundlename:
319 os.unlink(bundlename)
319 except OSError: 320 except OSError:
320 pass 321 pass
321 return other, [], other.close 322 return other, [], other.close
322 323
323 bundle = None 324 bundle = None