[Python-Dev] Tags from closed branch heads?

Dirkjan Ochtman dirkjan at ochtman.nl
Tue Jun 9 16:52:19 CEST 2009


So ca8d05e1f1d1 changed the default for repo.heads() to closed=False,
so that calls to heads() by default will not return closed heads.
Unfortunately, this also means that any tags from those heads will not
be considered anymore. That seems inadvertent at best, and may be
should be reverted. Conceptually, it seems wrong that deleting a
branch would also delete all the tags from it. I'd like to propose
this change:

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -320,7 +320,7 @@
     def _hgtagsnodes(self):
         last = {}
         ret = []
-        for node in reversed(self.heads()):
+        for node in reversed(self.heads(closed=True)):
             c = self[node]
             rev = c.rev()
             try:

Is that something we can agree on?

Cheers,

Dirkjan


More information about the Python-Dev mailing list