# HG changeset patch # User Augie Fackler # Date 1308342062 18000 # Node ID 88cb01c4575ece233d7919f00249ecf63429493f # Parent 2b30124c7d8ae51f814fbb1ca7624a6e9a2e1ee4 update: check wc.dirty() before setting overwrite=True merge.update() was missing a few dirtiness checks from workingcontext, including subrepo cleanliness checks. Using wc.dirty() instead of one-off checks for various forms of dirtiness will be significantly safer. diff -r 2b30124c7d8a -r 88cb01c4575e mercurial/merge.py --- a/mercurial/merge.py Thu Jun 16 15:26:17 2011 -0500 +++ b/mercurial/merge.py Fri Jun 17 15:21:02 2011 -0500 @@ -525,7 +525,7 @@ elif not overwrite: if pa == p1 or pa == p2: # linear pass # all good - elif wc.files() or wc.deleted(): + elif wc.dirty(missing=True): raise util.Abort(_("crosses branches (merge branches or use" " --clean to discard changes)")) elif onode is None: