diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5723,6 +5723,7 @@ def update(ui, repo, node=None, rev=None raise util.Abort(_("uncommitted local changes")) if not rev: rev = repo[repo[None].branch()].rev() + mergemod._checkunknown(repo, repo[None], repo[rev]) if clean: ret = hg.clean(repo, rev) diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -545,6 +545,8 @@ def update(repo, node, branchmerge, forc if not force and (wc.files() or wc.deleted()): raise util.Abort(_("outstanding uncommitted changes"), hint=_("use 'hg status' to list changes")) + if not force: + _checkunknown(repo, wc, p2) for s in wc.substate: if wc.sub(s).dirty(): raise util.Abort(_("outstanding uncommitted changes in " @@ -566,8 +568,6 @@ def update(repo, node, branchmerge, forc ### calculate phase action = [] folding = not util.checkcase(repo.path) - if not force: - _checkunknown(repo, wc, p2) if folding: _checkcollision(p2, branchmerge and p1) action += _forgetremoved(wc, p2, branchmerge)