David Schleimer  committed 117b3b4

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.

  • Participants
  • Parent commits 26aa017
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/

                               " 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
                                                 ' 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: