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.
--- 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: