[PATCH 1 of 2 V3] revert: warn that subrepos cannot be reverted

Angel Ezquerra angel.ezquerra at gmail.com
Fri Oct 14 18:10:13 CDT 2011


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1318633612 -7200
# Node ID adb7eb4d36eaa4a67b586357e1ec6de6435ab587
# Parent  be2c67a8bf886601671b6103a9b405ebd7d4b030
revert: warn that subrepos cannot be reverted

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4652,6 +4652,10 @@
         def badfn(path, msg):
             if path in names:
                 return
+            if path in repo[node].substate:
+                ui.warn("%s: %s\n" % (m.rel(path),
+                    'reverting subrepos is unsupported'))
+                return
             path_ = path + '/'
             for f in names:
                 if f.startswith(path_):


More information about the Mercurial-devel mailing list