comparison mercurial/commands.py @ 6984:6c4a08270222

merge with crew-stable
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 03 Sep 2008 19:03:57 +0200
parents 63b5f4c73c98 5ce625983208
children 2365c6d4c330
comparison
equal deleted inserted replaced
6981:029a54423a96 6984:6c4a08270222
286 bad = True 286 bad = True
287 else: 287 else:
288 reset = True 288 reset = True
289 elif extra or good + bad + skip + reset > 1: 289 elif extra or good + bad + skip + reset > 1:
290 raise util.Abort(_('incompatible arguments')) 290 raise util.Abort(_('incompatible arguments'))
291 elif not (good or bad or skip or reset):
292 ui.status(_('(no action selected)\n'))
293 return
294 291
295 if reset: 292 if reset:
296 p = repo.join("bisect.state") 293 p = repo.join("bisect.state")
297 if os.path.exists(p): 294 if os.path.exists(p):
298 os.unlink(p) 295 os.unlink(p)
327 f.rename() 324 f.rename()
328 finally: 325 finally:
329 del wlock 326 del wlock
330 327
331 if not state['good'] or not state['bad']: 328 if not state['good'] or not state['bad']:
332 return 329 if (good or bad or skip or reset):
330 return
331 if not state['good']:
332 raise util.Abort(_('cannot bisect (no known good revisions)'))
333 else:
334 raise util.Abort(_('cannot bisect (no known bad revisions)'))
333 335
334 # actually bisect 336 # actually bisect
335 nodes, changesets, good = hbisect.bisect(repo.changelog, state) 337 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
336 if changesets == 0: 338 if changesets == 0:
337 displayer = cmdutil.show_changeset(ui, repo, {}) 339 displayer = cmdutil.show_changeset(ui, repo, {})