Control: tags 775785 + patch
Control: tags 775785 + pending

Dear maintainer,

I've prepared an NMU for trac-mercurial (versioned as 
1.0.0.3+hg8df754d9b36a-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Pink Floyd: Shine On You Crazy Diamond (Parts 1-5)
diff -Nru trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/changelog trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/changelog
--- trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/changelog	2013-08-01 19:35:42.000000000 +0200
+++ trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/changelog	2015-02-07 17:56:31.000000000 +0100
@@ -1,3 +1,13 @@
+trac-mercurial (1.0.0.3+hg8df754d9b36a-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "Internal error when viewing Trac source browser":
+    add patch debian/patches/branchtags.patch, taken from upstream:
+    restore branchtags() after localrepository.branchtags was removed in
+    mercurial-2.9. (Closes: #775785)
+
+ -- gregor herrmann <gre...@debian.org>  Sat, 07 Feb 2015 17:53:39 +0100
+
 trac-mercurial (1.0.0.3+hg8df754d9b36a-1) unstable; urgency=low
 
   [ Matthias Schmitz ]
diff -Nru trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/branchtags.patch trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/branchtags.patch
--- trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/branchtags.patch	1970-01-01 01:00:00.000000000 +0100
+++ trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/branchtags.patch	2015-02-07 17:56:31.000000000 +0100
@@ -0,0 +1,60 @@
+Description: localrepository.branchtags was removed in mercurial-2.9
+Origin: upstream,
+ http://trac.edgewall.org/changeset?reponame=mercurial-plugin&old=26@tracext&new=28@tracext
+Bug: https://groups.google.com/forum/#!msg/trac-dev/UQkkXs4Jiu8/0FfNuo2MqgkJ
+Bug-Debian: https://bugs.debian.org/775785
+Forwarded: not-needed
+Author: Takumi IINO, Christian Boos
+Reviewed-by: gregor herrmann <gre...@debian.org>
+Last-Update: 2015-02-07
+Applied-Upstream: yes, r27, r28,
+ http://trac.edgewall.org/changeset/27/mercurial-plugin
+ http://trac.edgewall.org/changeset/28/mercurial-plugin
+
+--- a/tracext/hg/backend.py
++++ b/tracext/hg/backend.py
+@@ -21,6 +21,7 @@
+ import posixpath
+ import re
+ import sys
++import types
+ 
+ import pkg_resources
+ 
+@@ -154,6 +155,26 @@
+         if has_bookmarks:
+             return get_bookmarks(ctx)
+     return ()
++
++# Note: localrepository.branchtags was removed in mercurial-2.9
++#       see http://selenic.com/hg/rev/4274eda143cb
++def get_branchtags(repo):
++    """return a dict where branch names map to the tipmost head of
++    the branch, open heads come before closed_branches
++    """
++    def branchtip(heads):
++        '''return the tipmost branch head in heads'''
++        tip = heads[-1]
++        for h in reversed(heads):
++            if not repo[h].closesbranch():
++              tip = h
++              break
++        return tip
++
++    bt = {}
++    for bn, heads in repo.branchmap().iteritems():
++        bt[bn] = branchtip(heads)
++    return bt
+         
+ class trac_ui(ui):
+     # Note: will be dropped in 0.13, see MercurialConnector._setup_ui
+@@ -546,6 +567,9 @@
+                               " repository (Mercurial %(version)s says "
+                               "%(error)s)",
+                               path=path, version=version, error=error))
++        # restore branchtags() if needed (see StackOverflow:972)
++        if not getattr(self.repo, 'branchtags', None):
++            self.repo.branchtags = types.MethodType(get_branchtags, self.repo)
+         Repository.__init__(self, 'hg:%s' % path, params, log)
+ 
+     def from_hg_time(self, timeinfo):
diff -Nru trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/series trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/series
--- trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/series	2013-06-25 01:11:53.000000000 +0200
+++ trac-mercurial-1.0.0.3+hg8df754d9b36a/debian/patches/series	2015-02-07 17:48:25.000000000 +0100
@@ -1 +1,2 @@
 disable-installing-docs
+branchtags.patch

Attachment: signature.asc
Description: Digital Signature

Reply via email to