[PATCH 1 of 3 [STABLE][V2]] subrepo: do not try to get hidden revisions

Angel Ezquerra angel.ezquerra at gmail.com
Wed Jan 22 01:17:39 CST 2014


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1385255414 -3600
#      Sun Nov 24 02:10:14 2013 +0100
# Branch stable
# Node ID dec38ad2a0cb5bf3fb55e38cdfbf1a73126589a1
# Parent  dbf305f499613e6b833847b72f1eb5424f9331cc
subrepo: do not try to get hidden revisions

If a subrepo revision is hidden (because it was amended, for example) it does
not make sense to try to "get" it from the remote subrepository.

Note that in order to avoid making the change look bigger than it is, this adds
an unnecessary else clause. This will be removed on a follow up patch.

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -701,7 +701,9 @@
 
     def _get(self, state):
         source, revision, kind = state
-        if revision not in self._repo:
+        if revision in self._repo.unfiltered():
+            return
+        else:
             self._repo._subsource = source
             srcurl = _abssource(self._repo)
             other = hg.peer(self._repo, {}, srcurl)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-2.4-1.patch
Type: text/x-patch
Size: 1058 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140122/d00f760d/attachment.bin>


More information about the Mercurial-devel mailing list