[PATCH 01 of 14 "] repoview: fix conditional around unserved changesets

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sat Apr 13 19:40:31 EDT 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1555181870 -7200
#      Sat Apr 13 20:57:50 2019 +0200
# Node ID 5ce5915a48297de3f7464e8f149629799da5ca6f
# Parent  2a3c0106ded9584938116ec2b1cbc7e21f13e1e1
# EXP-Topic hgweb-obsolete
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 5ce5915a4829
repoview: fix conditional around unserved changesets

The conditional could lead to wrong computation since we have more unserved
changesets than just the "secret" phase.

In addition, now that we have efficient caching of phased changesets, we don't
need the conditional anymore.

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -93,8 +93,8 @@ def computeunserved(repo, visibilityexce
     assert not repo.changelog.filteredrevs
     # fast path in simple case to avoid impact of non optimised code
     hiddens = filterrevs(repo, 'visible')
-    if phases.hassecret(repo):
-        secrets = repo._phasecache.getrevset(repo, phases.remotehiddenphases)
+    secrets = repo._phasecache.getrevset(repo, phases.remotehiddenphases)
+    if secrets:
         return frozenset(hiddens | frozenset(secrets))
     else:
         return hiddens


More information about the Mercurial-devel mailing list