diff -r 42e89b87ca79 -r 4e857213d2d1 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri May 08 15:04:14 2015 -0700 +++ b/mercurial/localrepo.py Mon May 11 16:16:22 2015 -0700 @@ -1462,9 +1462,9 @@ cctx = context.workingcommitctx(self, status, text, user, date, extra) - if (not force and not extra.get("close") and not merge - and not cctx.files() - and wctx.branch() == wctx.p1().branch()): + allowemptycommit = (wctx.branch() != wctx.p1().branch() or force + or extra.get('close') or merge or cctx.files()) + if not allowemptycommit: return None if merge and cctx.deleted():