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

RESOLVED FIXED

Status

Release Engineering
Mozharness
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: pmoore, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
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"
    ....
}]
(Reporter)

Updated

3 years ago
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
(Reporter)

Comment 1

3 years ago
Created attachment 8370750 [details] [diff] [review]
bug968195_mozharness.patch

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 2

3 years ago
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+
(Reporter)

Comment 3

3 years ago
This patch made it into bug 866260:
https://hg.mozilla.org/build/mozharness/rev/c84a7b30ebf7
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Reporter)

Updated

3 years ago
Attachment #8370750 - Flags: checked-in+

Updated

3 years ago
Component: Tools → Mozharness
(Reporter)

Updated

3 years ago
See Also: → bug 1062890
You need to log in before you can comment on or make changes to this bug.