comparison mercurial/commands.py @ 8806:14a0bdd59848

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Sat, 13 Jun 2009 18:08:51 -0500
parents 2bcef677a6c3 2726a6df11e9
children ac92775b3b80
comparison
equal deleted inserted replaced
8801:28eaf6f8abce 8806:14a0bdd59848
337 337
338 state = hbisect.load_state(repo) 338 state = hbisect.load_state(repo)
339 339
340 if command: 340 if command:
341 commandpath = util.find_exe(command) 341 commandpath = util.find_exe(command)
342 if commandpath is None:
343 raise util.Abort(_("cannot find executable: %s") % command)
342 changesets = 1 344 changesets = 1
343 try: 345 try:
344 while changesets: 346 while changesets:
345 # update state 347 # update state
346 status = subprocess.call([commandpath]) 348 status = subprocess.call([commandpath])
353 raise util.Abort(_("failed to execute %s") % command) 355 raise util.Abort(_("failed to execute %s") % command)
354 elif status < 0: 356 elif status < 0:
355 raise util.Abort(_("%s killed") % command) 357 raise util.Abort(_("%s killed") % command)
356 else: 358 else:
357 transition = "bad" 359 transition = "bad"
358 node = repo.lookup(rev or '.') 360 ctx = repo[rev or '.']
359 state[transition].append(node) 361 state[transition].append(ctx.node())
360 ui.note(_('Changeset %s: %s\n') % (short(node), transition)) 362 ui.status(_('Changeset %d:%s: %s\n') % (ctx, ctx, transition))
361 check_state(state, interactive=False) 363 check_state(state, interactive=False)
362 # bisect 364 # bisect
363 nodes, changesets, good = hbisect.bisect(repo.changelog, state) 365 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
364 # update to next check 366 # update to next check
365 cmdutil.bail_if_changed(repo) 367 cmdutil.bail_if_changed(repo)