Closed Bug 968195 Opened 10 years ago Closed 10 years ago

vcs2vcs sync in mozharness does not work if repo_name is different to basename of repo url

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pmoore, Unassigned)

References

Details

Attachments

(1 file)

If you have a config file for the mozharness vcs2vcs process (i.e. mozharness/configs/vcs_sync/*.py) whereby under "conversion_repos" there is a "repo_name" that does not match the basename of the url "repo" in the same section, the vcs process will not work. In other words, there is an assumption in the code that whatever comes after the last forward slash in the url or the "repo" matches the "repo_name"

e.g. this works:
"conversion_repos": [{
    "repo": "https://hg.mozilla.org/build/puppet"
    "repo_name": "puppet"
    ....
}]

but this fails:
"conversion_repos": [{
    "repo": "https://hg.mozilla.org/build/puppet"
    "repo_name": "build-puppet"
    ....
}]
Summary: vcs2vcs sync in mozharness does not work if conversion_dir is different to basename of hg repo → vcs2vcs sync in mozharness does not work if repo_name is different to basename of repo url
Basically the code was doing an hg clone in the parent directory, without specifying a target directory name, so the created folder had the name of the last portion of the url, whereas you can explicitly specify the target directory name/path in the clone command by adding it at the end of the clone command. This also meant the command does not need to be executed from the parent directory (since “dest” is an absolute path) so I could remove the "cwd=..." part too.
Attachment #8370750 - Flags: review?(aki)
Comment on attachment 8370750 [details] [diff] [review]
bug968195_mozharness.patch

Looks like I never renamed a repo.  Good catch!
Attachment #8370750 - Flags: review?(aki) → review+
This patch made it into bug 866260:
https://hg.mozilla.org/build/mozharness/rev/c84a7b30ebf7
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8370750 - Flags: checked-in+
Component: Tools → Mozharness
See Also: → 1062890
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: