diff svnwrap/svn_swig_wrapper.py @ 155:ba801f44d240

utility_commands: Implement rebuildmeta so that metadata can be rebuilt. hg_delta_editor: Fixed some longstanding branch_info bugs detected while rebuilding meta.
author Augie Fackler <durin42@gmail.com>
date Tue, 23 Dec 2008 22:19:26 -0600
parents 04c92c2c4501
children 84fbf1469a31
line wrap: on
line diff
--- a/svnwrap/svn_swig_wrapper.py
+++ b/svnwrap/svn_swig_wrapper.py
@@ -180,12 +180,19 @@ class SubversionRepo(object):
 
         This returns a dictionary of tag: (source path, source rev)
         """
-        tags = self.list_dir('tags').keys()
+        return self.tags_at_rev(self.HEAD)
+
+    def tags_at_rev(self, revision):
+        try:
+            tags = self.list_dir('tags', revision=revision).keys()
+        except core.SubversionException, e:
+            if e.apr_err == 160013:
+                return {}
+            raise
         tag_info = {}
-        head = self.HEAD
         for t in tags:
             tag_info[t] = self._get_copy_source('tags/%s' % t,
-                                                cached_head=head)
+                                                cached_head=revision)
         return tag_info
 
     def _get_copy_source(self, path, cached_head=None):