comparison 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
comparison
equal deleted inserted replaced
154:6fa97cfbf62f 155:ba801f44d240
178 def tags(self): 178 def tags(self):
179 """Get the current tags in this repo assuming a standard layout. 179 """Get the current tags in this repo assuming a standard layout.
180 180
181 This returns a dictionary of tag: (source path, source rev) 181 This returns a dictionary of tag: (source path, source rev)
182 """ 182 """
183 tags = self.list_dir('tags').keys() 183 return self.tags_at_rev(self.HEAD)
184
185 def tags_at_rev(self, revision):
186 try:
187 tags = self.list_dir('tags', revision=revision).keys()
188 except core.SubversionException, e:
189 if e.apr_err == 160013:
190 return {}
191 raise
184 tag_info = {} 192 tag_info = {}
185 head = self.HEAD
186 for t in tags: 193 for t in tags:
187 tag_info[t] = self._get_copy_source('tags/%s' % t, 194 tag_info[t] = self._get_copy_source('tags/%s' % t,
188 cached_head=head) 195 cached_head=revision)
189 return tag_info 196 return tag_info
190 197
191 def _get_copy_source(self, path, cached_head=None): 198 def _get_copy_source(self, path, cached_head=None):
192 """Get copy revision for the given path, assuming it was meant to be 199 """Get copy revision for the given path, assuming it was meant to be
193 a copy of the entire tree. 200 a copy of the entire tree.