[PATCH 2 of 3 STABLE] bundlerepo: ignore secret revisions at "known()" according to filtered or not
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Tue May 28 10:02:53 CDT 2013
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1369751670 -32400
# Tue May 28 23:34:30 2013 +0900
# Branch stable
# Node ID b36954ea6f53c20a428d3503ee2964457bea21a2
# Parent 32537a1588d2b80e9d40d8c61327391162f2b929
bundlerepo: ignore secret revisions at "known()" according to filtered or not
This is required to fix "hg incoming" problem in succeeding patch.
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -166,6 +166,9 @@
def canpush(self):
return False
+ def known(self, nodes):
+ return self._repo.known(nodes, ignoresecert=self._filtered)
+
def unfiltered(self):
if not self._filtered:
return self
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -675,13 +675,14 @@
repo = (remote and remote.local()) and remote or self
return repo[key].branch()
- def known(self, nodes):
+ def known(self, nodes, ignoresecert=True):
nm = self.changelog.nodemap
pc = self._phasecache
result = []
for n in nodes:
r = nm.get(n)
- resp = not (r is None or pc.phase(self, r) >= phases.secret)
+ resp = not (r is None or
+ (ignoresecert and pc.phase(self, r) >= phases.secret))
result.append(resp)
return result
More information about the Mercurial-devel
mailing list