mercurial/merge.py
changeset 3580 41989e55fa37
parent 3578 3b4e00cba57a
child 3581 be61bd32046c
child 3592 fffc8a733bf9
equal deleted inserted replaced
3579:0ed2732aa393 3580:41989e55fa37
   382         raise util.Abort(_("outstanding uncommitted merges"))
   382         raise util.Abort(_("outstanding uncommitted merges"))
   383     if pa == p1 or pa == p2: # is there a linear path from p1 to p2?
   383     if pa == p1 or pa == p2: # is there a linear path from p1 to p2?
   384         if branchmerge:
   384         if branchmerge:
   385             raise util.Abort(_("there is nothing to merge, just use "
   385             raise util.Abort(_("there is nothing to merge, just use "
   386                                "'hg update' or look at 'hg heads'"))
   386                                "'hg update' or look at 'hg heads'"))
   387     elif not (overwrite or branchmerge):
   387     elif not branchmerge:
   388         raise util.Abort(_("update spans branches, use 'hg merge' "
   388         if not overwrite:
   389                            "or 'hg update -C' to lose changes"))
   389             if wc.files():
       
   390                 raise util.Abort(_("outstanding uncommited changes, use "
       
   391                                    "'hg update -C' to lose changes"))
       
   392             else:
       
   393                 overwrite = True
   390     if branchmerge and not forcemerge:
   394     if branchmerge and not forcemerge:
   391         if wc.modified() or wc.added() or wc.removed():
   395         if wc.modified() or wc.added() or wc.removed():
   392             raise util.Abort(_("outstanding uncommitted changes"))
   396             raise util.Abort(_("outstanding uncommitted changes"))
   393 
   397 
   394     ### calculate phase
   398     ### calculate phase