Mercurial > hgsubversion
changeset 1002:117b3b421294
buildmeta: verify uuid when passed explicit url
2c87bdc43d3c changed buildmeta to read the uuid from local disk, if
it's available. As a side effect, it disabled the validation of the
uuid we've recorded locall in the commits against the uuid of the repo
we are building against. This is probably reasonable when someone
runs a bare updatemeta or rebuildmeta. I think it's a worthwhile
sanity check when someone passes an explicit repository url to
rebuild/updatemeta. This restores the validation in that case, and
fixes a failing test in the process.
author | David Schleimer <dschleimer@fb.com> |
---|---|
date | Fri, 12 Apr 2013 10:51:42 -0700 |
parents | 26aa0172725b |
children | 6945d3359456 |
files | hgsubversion/svncommands.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/svncommands.py +++ b/hgsubversion/svncommands.py @@ -61,8 +61,10 @@ def _buildmeta(ui, repo, args, partial=F " here (.hg not found)") dest = None + validateuuid = False if len(args) == 1: dest = args[0] + validateuuid = True elif len(args) > 1: raise hgutil.Abort('rebuildmeta takes 1 or no arguments') url = repo.ui.expandpath(dest or repo.ui.config('paths', 'default-push') or @@ -206,7 +208,8 @@ def _buildmeta(ui, repo, args, partial=F ' defect in replay') # write repository uuid if required - if uuid is None: + if uuid is None or validateuuid: + validateuuid = False uuid = convinfo[4:40] if not skipuuid: if svn is None: