changeset 3555:ff0646d1a1b4 beta

changelog: make it possible to use closed branches in ?branch=... Closed branches in Mercurial are just not announced. It should still be possible to use them. (And arguably there should also be a way to explore them in the UI.)
author Mads Kiilerich <madski@unity3d.com>
date Tue, 19 Mar 2013 22:50:28 +0100
parents 189ce0d7b7c6
children 4358b1b9307d
files rhodecode/lib/vcs/backends/hg/repository.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/vcs/backends/hg/repository.py	Tue Mar 12 13:50:06 2013 +0100
+++ b/rhodecode/lib/vcs/backends/hg/repository.py	Tue Mar 19 22:50:28 2013 +0100
@@ -79,6 +79,13 @@
     def branches(self):
         return self._get_branches()
 
+    @LazyProperty
+    def allbranches(self):
+        """
+        List all branches, including closed branches.
+        """
+        return self._get_branches(closed=True)
+
     def _get_branches(self, closed=False):
         """
         Get's branches for this repository
@@ -460,7 +467,7 @@
             raise RepositoryError("Start revision '%s' cannot be "
                                   "after end revision '%s'" % (start, end))
 
-        if branch_name and branch_name not in self.branches.keys():
+        if branch_name and branch_name not in self.allbranches.keys():
             raise BranchDoesNotExistError('Branch %s not found in'
                                   ' this repository' % branch_name)
         if end_pos is not None: