# HG changeset patch # User Sean Farley # Date 1395678043 18000 # Node ID 52de1f3b6824fa51dae92c6ca2da567f25eb9231 # Parent 3028f083bd95e46ae5467172e41f781da3404e54 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. diff --git a/hgsubversion/svncommands.py b/hgsubversion/svncommands.py --- 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