diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1475,6 +1475,7 @@ class localrepository(object): cctx = context.workingcommitctx(self, status, text, user, date, extra) + # internal config: ui.allowemptycommit allowemptycommit = (wctx.branch() != wctx.p1().branch() or extra.get('close') or merge or cctx.files() or self.ui.configbool('ui', 'allowemptycommit'))