From patchwork Mon Nov 25 20:46:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,4] subrepo: do not try to get hidden revisions From: Angel Ezquerra X-Patchwork-Id: 3134 Message-Id: To: mercurial-devel@selenic.com Date: Mon, 25 Nov 2013 21:46:47 +0100 # HG changeset patch # User Angel Ezquerra # Date 1385255414 -3600 # Sun Nov 24 02:10:14 2013 +0100 # Node ID adb3d2a8dfd8bb1c6531225ef84be55f082bac0f # Parent 1c46b18b0e1c47fa4cecf21b78c083a54ae9903f 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. # HG changeset patch # User Angel Ezquerra # Date 1385255414 -3600 # Sun Nov 24 02:10:14 2013 +0100 # Node ID adb3d2a8dfd8bb1c6531225ef84be55f082bac0f # Parent 1c46b18b0e1c47fa4cecf21b78c083a54ae9903f 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 @@ -648,7 +648,10 @@ def _get(self, state): source, revision, kind = state - if revision not in self._repo: + urepo = self._repo.unfiltered() + if revision in urepo: + return + else: self._repo._subsource = source srcurl = _abssource(self._repo) other = hg.peer(self._repo, {}, srcurl)