changeset 1167:4f31a0a6fc86

svncommands: use meta.tags instead of duplicating code
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:43 -0500
parents 8a1bf7d011c3
children 6137fcdef1b9
files hgsubversion/svncommands.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -92,10 +92,8 @@ def _buildmeta(ui, repo, args, partial=F
     revmap.write('1\n')
     revmap.writelines(sofar)
     last_rev = -1
-    tagfile = os.path.join(meta.metapath, 'tagmap')
-    if not partial and os.path.exists(maps.Tags.filepath(repo)) :
-        os.unlink(maps.Tags.filepath(repo))
-    tags = maps.Tags(repo)
+    if not partial and os.path.exists(meta.tagfile):
+        os.unlink(meta.tagfile)
 
     layout = None
     layoutobj = None
@@ -172,7 +170,7 @@ def _buildmeta(ui, repo, args, partial=F
                 # number.
                 tagging = int(convinfo[40:].split('@')[1])
                 tagrev = max(tagged, tagging)
-                tags[tag] = node.bin(ha), tagrev
+                meta.tags[tag] = node.bin(ha), tagrev
 
         # check that the conversion metadata matches expectations
         assert convinfo.startswith('svn:')