comparison mercurial/merge.py @ 13437:6169493ac3f9 stable

Do not allow merging with uncommitted changes in a subrepo
author Oleg Stepanov <oleg.stepanov@jetbrains.com>
date Wed, 16 Feb 2011 08:56:11 -0800
parents 14f3795a5ed7
children fac040b7e822
comparison
equal deleted inserted replaced
13436:b391c0c9be61 13437:6169493ac3f9
506 raise util.Abort(_("nothing to merge (use 'hg update'" 506 raise util.Abort(_("nothing to merge (use 'hg update'"
507 " or check 'hg heads')")) 507 " or check 'hg heads')"))
508 if not force and (wc.files() or wc.deleted()): 508 if not force and (wc.files() or wc.deleted()):
509 raise util.Abort(_("outstanding uncommitted changes " 509 raise util.Abort(_("outstanding uncommitted changes "
510 "(use 'hg status' to list changes)")) 510 "(use 'hg status' to list changes)"))
511 for s in wc.substate:
512 if wc.sub(s).dirty():
513 raise util.Abort(_("outstanding uncommitted changes in "
514 "subrepository '%s'") % s)
515
511 elif not overwrite: 516 elif not overwrite:
512 if pa == p1 or pa == p2: # linear 517 if pa == p1 or pa == p2: # linear
513 pass # all good 518 pass # all good
514 elif wc.files() or wc.deleted(): 519 elif wc.files() or wc.deleted():
515 raise util.Abort(_("crosses branches (merge branches or use" 520 raise util.Abort(_("crosses branches (merge branches or use"