David Schleimer avatar 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.

Comments (0)

Files changed (1)


                               " 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:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.