Closed Bug 1491408 Opened 7 years ago Closed 7 years ago

testing/geckodriver/build.rs is very slow if your hg config defaults to |--follow|

Categories

(Testing :: geckodriver, defect, P1)

Version 3
defect

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: Alex_Gaynor, Assigned: ato)

References

Details

Attachments

(1 file)

In my system-wide hg config I make |hg log| default to |--follow|. This causes: https://searchfox.org/mozilla-central/source/testing/geckodriver/build.rs#35 to be incredibly slow, since it prints the node for _every single commit_. A solution would be to pass |--no-follow| in the invocation of |hg log|.
build.rs should set HGPLAIN=1 in the environment to avoid this.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Priority: -- → P1
Looking at this I discovered another bug with build.rs. For Mercurial we use "hg log -r." in the CWD which selects the last commit in the current working directory, but for git we just do "git log -1" which picks the latest commit to the repository, whatever that may be.
Disregard what I just said about "hg log -r.": it apparently selects the parent/tip commit of the entire repository.
Blocks: 1491799
This sets HGPLAIN and GIT_CONFIG_NOSYSTEM to bypass local user version control system configuration when the build script is invoked. If not set, the version control system's output could be influenced by configuration settings. It was for example discovered that if you have "hg log" default to --follow, this slows down the Gecko build significantly since it prints the node for every single commit. According to hg(1) it is highly recommended for programs invoking hg to set this.
Attachment #9009588 - Flags: review?(hskupin)
Comment on attachment 9009588 [details] [diff] [review] bypass local vcs config when invoking build script Review of attachment 9009588 [details] [diff] [review]: ----------------------------------------------------------------- ::: testing/geckodriver/build.rs @@ +53,5 @@ > S: AsRef<OsStr>, > I: IntoIterator<Item = S>, > { > let mut cmd = Command::new(program); > + cmd.env("HGPLAIN", "1"); Note that this doesn't actually disable any configuration for Mercurial but only those which change the default output.
Attachment #9009588 - Flags: review?(hskupin) → review+
Thanks for jumping on this!
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/mozilla-central/rev/b7f409bd51c8 bypass local vcs config when invoking build script. r=whimboo a=Aryx
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: