changeset 1164:52de1f3b6824

svncommands: use meta.uuid instead of duplicating code SVNMeta will take care of reading and writing the uuid file so we use that instead of duplicating the same code.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:43 -0500
parents 3028f083bd95
children eba7de99c576
files hgsubversion/svncommands.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -56,8 +56,6 @@ def _buildmeta(ui, repo, args, partial=F
                              repo.ui.config('paths', 'default') or '')
 
     meta = svnmeta.SVNMeta(repo, skiperrorcheck=True)
-    uuidpath = os.path.join(meta.metapath, 'uuid')
-    uuid = util.load(uuidpath)
 
     subdirpath = os.path.join(meta.metapath, 'subdir')
     subdir = util.load(subdirpath)
@@ -202,7 +200,7 @@ def _buildmeta(ui, repo, args, partial=F
                                                 ' defect in replay')
 
         # write repository uuid if required
-        if uuid is None or validateuuid:
+        if meta.uuid is None or validateuuid:
             validateuuid = False
             uuid = convinfo[4:40]
             if not skipuuid:
@@ -211,7 +209,7 @@ def _buildmeta(ui, repo, args, partial=F
                 if uuid != svn.uuid:
                     raise hgutil.Abort('remote svn repository identifier '
                                        'does not match')
-            util.dump(uuid, uuidpath)
+            meta.uuid = uuid
 
         # don't reflect closed branches
         if (ctx.extra().get('close') and not ctx.files() or