Mercurial > hg
changeset 14663:88cb01c4575e
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.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 17 Jun 2011 15:21:02 -0500 |
parents | 2b30124c7d8a |
children | 0ae98cd2a83f |
files | mercurial/merge.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: