diff -r 12bc7f06fc41 -r 6f63c47cbb86 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Fri Sep 05 11:34:29 2014 -0700 +++ b/mercurial/cmdutil.py Fri Sep 05 11:36:20 2014 -0700 @@ -659,6 +659,7 @@ n = None if update: + repo.dirstate.beginparentchange() if p1 != parents[0]: updatefunc(repo, p1.node()) if p2 != parents[1]: @@ -698,6 +699,7 @@ n = repo.commit(message, opts.get('user') or user, opts.get('date') or date, match=m, editor=editor, force=partial) + repo.dirstate.endparentchange() else: if opts.get('exact') or opts.get('import_branch'): branch = branch or 'default'