[PATCH 5 of 6] revert: drop special case handling for file unknown in parent
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Aug 14 16:35:59 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1403625436 -3600
# Tue Jun 24 16:57:16 2014 +0100
# Node ID cb437f41f3d1523b2a56791a3694434d037c1fff
# Parent cf3fa01f51d15a6eb03957a74502d44e3f7575d2
revert: drop special case handling for file unknown in parent
We had a special case for file not caught by any categories. It was aimed at file
missing in wc and wc's parent but existing in the target revision. This is now
properly handled using status information.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2486,13 +2486,11 @@ def revert(ui, repo, ctx, parents, *pats
else:
# Not touched in current dirstate.
# file is unknown in parent, restore older version or ignore.
if abs not in repo.dirstate:
- if mfentry:
- handle(actions['add'], True)
- elif exact:
+ if exact:
ui.warn(_('file not managed: %s\n') % rel)
continue
# parent is target, no changes mean no changes
if node == parent:
More information about the Mercurial-devel
mailing list