comparison hgext/rebase.py @ 15923:4b088ae9d47a

rebase: only advance phase on successful commit
author Matt Mackall <mpm@selenic.com>
date Wed, 18 Jan 2012 18:14:55 -0600
parents e66084ef8449
children cd42f77d30c4
comparison
equal deleted inserted replaced
15922:23921c17299a 15923:4b088ae9d47a
373 date=ctx.date(), extra=extra, editor=editor) 373 date=ctx.date(), extra=extra, editor=editor)
374 repo.dirstate.setbranch(repo[newrev].branch()) 374 repo.dirstate.setbranch(repo[newrev].branch())
375 targetphase = max(ctx.phase(), phases.draft) 375 targetphase = max(ctx.phase(), phases.draft)
376 # retractboundary doesn't overwrite upper phase inherited from parent 376 # retractboundary doesn't overwrite upper phase inherited from parent
377 newnode = repo[newrev].node() 377 newnode = repo[newrev].node()
378 phases.retractboundary(repo, targetphase, [newnode]) 378 if newnode:
379 phases.retractboundary(repo, targetphase, [newnode])
379 return newrev 380 return newrev
380 except util.Abort: 381 except util.Abort:
381 # Invalidate the previous setparents 382 # Invalidate the previous setparents
382 repo.dirstate.invalidate() 383 repo.dirstate.invalidate()
383 raise 384 raise