Move `mach mercurial-setup` into version-control-tools and make part of `mach bootstrap`

RESOLVED FIXED in Firefox 50

Status

enhancement
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: gps, Assigned: gps)

Tracking

unspecified
mozilla50
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(28 attachments, 6 obsolete attachments)

58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glob
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
58 bytes, text/x-review-board-request
glandium
: review+
Details
Nobody really likes `mach mercurial-setup` today. Not even me - and I wrote most of it.

I've constantly been held back making `mach mercurial-setup` better because it doesn't have unit tests. And the code has grown organically into something kind of unwieldy. There is also the issue where `mach mercurial-setup` reinvents a lot of logic from Mercurial itself and has to redundantly encode things present in version-control-tools.

Goal 1: move the `mach mercurial-setup` logic to version-control-tools, where it lives next to many of the things it is configuring and can be tested more easily.

I've also not been a fan of the integration between `mach mercurial-setup` and the rest of the setup mechanism. I'd like `mach mercurial-setup` to be part of `mach bootstrap` and would like `mach bootstrap` to also handle cloning of repos (that's a separate bug though). We can't easily put `mach mercurial-setup` inside `mach bootstrap` because of a chicken-and-egg problem: if you are running from the self-contained bootstrap.py file, you won't have the libraries needed to run `mach mercurial-setup`.

Goal 2: integrate the v-c-t based `mach mercurial-setup` into `mach bootstrap`.

Finally, nobody likes that `mach` forces you to run `mach mercurial-setup`. I've apologized for this before.

Goal 3: remove the forced running of `mach mercurial-setup` from `mach`.
Source obtained from PyPI and imported without modifications.

Review commit: https://reviewboard.mozilla.org/r/57024/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57024/
Attachment #8758942 - Flags: review?(smacleod)
Attachment #8758943 - Flags: review?(smacleod)
Attachment #8758944 - Flags: review?(smacleod)
Attachment #8758945 - Flags: review?(smacleod)
Attachment #8758946 - Flags: review?(smacleod)
Attachment #8758947 - Flags: review?(smacleod)
Attachment #8758948 - Flags: review?(smacleod)
Attachment #8758949 - Flags: review?(smacleod)
Attachment #8758950 - Flags: review?(smacleod)
Attachment #8758951 - Flags: review?(smacleod)
Attachment #8758952 - Flags: review?(smacleod)
Attachment #8758953 - Flags: review?(smacleod)
Attachment #8758954 - Flags: review?(smacleod)
Attachment #8758955 - Flags: review?(smacleod)
Attachment #8758956 - Flags: review?(smacleod)
Attachment #8758957 - Flags: review?(smacleod)
Attachment #8758958 - Flags: review?(smacleod)
Attachment #8758959 - Flags: review?(smacleod)
Attachment #8758960 - Flags: review?(smacleod)
Attachment #8758961 - Flags: review?(smacleod)
Attachment #8758962 - Flags: review?(smacleod)
Attachment #8758963 - Flags: review?(smacleod)
The files constituting the heart of `mach mercurial-setup`
in mozilla-central have been imported. b0096c5c727749ad3e79cbdf20d2e96bd179c213
was used. Files are unmodified.

Upcoming patches will teach version-control-tools how to call into
them.

Review commit: https://reviewboard.mozilla.org/r/57028/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57028/
We move the introduction message and basic version detection from the
old wizard to the extension. A basic test has been added.

The wizard has support for running a specific list of steps. This is
to facilitate testing. (It would be difficult to test every step in
every test.)

Review commit: https://reviewboard.mozilla.org/r/57030/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57030/
We don't need this in the new implementation because the config is
already parsed and loaded by Mercurial.

Review commit: https://reviewboard.mozilla.org/r/57032/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57032/
This commit does a lot.

The next part of the config wizard to port is setting the username.
Since Mercurial's built-in config API doesn't support writing config
files, we need to use a separate API for that. We borrow the approach
of the old config wizard and use configobj for config file
manipulation. However, we change things up a bit.

Instead of using ConfigObj for reading and writing, we use it for
writing only. This ensures that config values from %include are
recognized by the wizard. We also remove the restriction of the
old config parser that prohibited %include from working. We do this
by normalizing %include during load and save operations.

Review commit: https://reviewboard.mozilla.org/r/57034/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57034/
This is almost a straight port of the legacy wizard. We dropped setting
diff.unified=8 because this is holdover from the days when we
exported patches to Bugzilla after `hg export`. These days we have
tools to submit to MozReview and attach to Bugzilla. These tools should
provide appropriate context.

But diff.git and diff.showfunc are generally useful, so keep them
enabled.

Review commit: https://reviewboard.mozilla.org/r/57036/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57036/
Before, we prompted separately for both histedit and rebase. Let's make
it simpler by just having one prompt and enabling both.

Review commit: https://reviewboard.mozilla.org/r/57040/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57040/
It is enabled by default in Mercurial 3.5, which everyone should be
running by now.

Review commit: https://reviewboard.mozilla.org/r/57042/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57042/
clonebundles is built into Mercurial as of 3.6 and enabled by default
in 3.7. Let's not bother ourselves with this code any more: over time
people will have clonebundles enabled in the vanilla install.

Review commit: https://reviewboard.mozilla.org/r/57044/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57044/
Rather than port support for hgwatchman, let's drop support for it
and encourage people to upgrade to Mercurial 3.8.

Review commit: https://reviewboard.mozilla.org/r/57046/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57046/
pulsebot is doing everything bzpost did. I don't think bzpost really
adds much value. Let's not prompt to enable it.

Review commit: https://reviewboard.mozilla.org/r/57048/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57048/
This code is more complicated than most things. Good thing we now have
tests for it!

Review commit: https://reviewboard.mozilla.org/r/57052/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57052/
Pretty straightforward. I'm tempted to consolidate this with the
"codereview" step. But I'll keep backwards compatibility for now.

Review commit: https://reviewboard.mozilla.org/r/57054/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57054/
Another basic port from upstream.

At the end of this commit, config.py had no value, so it was deleted.

Review commit: https://reviewboard.mozilla.org/r/57058/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57058/
We've ported nearly everything to a Mercurial extension. The remaining
items aren't super important to port - they can still live on the
mozilla-central side of the wall.

Review commit: https://reviewboard.mozilla.org/r/57066/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57066/
Comment on attachment 8758942 [details]
configobj: vendor configobj 4.7.2;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57024/diff/1-2/
Attachment #8758942 - Attachment description: MozReview Request: configobj: vendor configobj 5.0.6; r?smacleod → MozReview Request: configobj: vendor configobj 4.7.2; r?smacleod
Comment on attachment 8758943 [details]
hgext: add configobj to sys.path in extensions;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57026/diff/1-2/
Comment on attachment 8758944 [details]
configwizard: import files from mozilla-central (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57028/diff/1-2/
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57030/diff/1-2/
Comment on attachment 8758946 [details]
configwizard: remove parsing of config from legacy code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57032/diff/1-2/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/1-2/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/1-2/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/1-2/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/1-2/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/1-2/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/1-2/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/1-2/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/1-2/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/1-2/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/1-2/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/1-2/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/1-2/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/1-2/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/1-2/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/1-2/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/1-2/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/1-2/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/2-3/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/2-3/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/2-3/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/2-3/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/2-3/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/2-3/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/2-3/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/2-3/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/2-3/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/2-3/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/2-3/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/2-3/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/2-3/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/2-3/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/2-3/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/2-3/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/2-3/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/3-4/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/3-4/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/3-4/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/3-4/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/3-4/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/3-4/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/3-4/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/3-4/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/3-4/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/3-4/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/3-4/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/3-4/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/3-4/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/3-4/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/3-4/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/3-4/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/3-4/
I never really liked this. Other people had even more visceral
reactions. Let's get rid of it.

The code for touching a file when it runs has also been removed because
the only thing it was used for was the nagging feature.

Review commit: https://reviewboard.mozilla.org/r/57098/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57098/
Attachment #8758993 - Flags: review?(mh+mozilla)
Attachment #8758994 - Flags: review?(mh+mozilla)
Attachment #8758995 - Flags: review?(mh+mozilla)
Attachment #8758996 - Flags: review?(mh+mozilla)
This begins the consolidation of `mach mercurial-setup` into
`mach bootstrap`. The first step is to move the content of the
mach_commands.py file into the bootstrapper's.

I'm not crazy about adding the sys.path entry for tools/mercurial.
I intend to clean this up later.

Review commit: https://reviewboard.mozilla.org/r/57100/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57100/
Currently, on first run of `mach` it prompts you to create a state
directory. The hand-off between bootstrap and `mach` has always
bothered me because bootstrap is supposed to get your system in a good
state.

In this commit, we teach the bootstrap tool to create the state
directory when not present. This duplicates functionality from `mach`
but I'm fine with that.

In future commits, we'll build on this work to have the bootstrapper
run the Mercurial config wizard, which needs this state directory.

Review commit: https://reviewboard.mozilla.org/r/57102/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57102/
If a state directory is available and we're running in interactive mode
(or have been told otherwise), we now configure Mercurial during
bootstrap.

This consists of cloning version-control-tools to the state directory
(mimicking code in `mach mercurial-setup` today) and running the
config wizard from version-control-tools.

Review commit: https://reviewboard.mozilla.org/r/57104/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/57104/
Comment on attachment 8758993 [details]
Bug 1277406 - Remove nagging to run `mach mercurial-setup` from mach;

https://reviewboard.mozilla.org/r/57098/#review53872

I'll repeat here what I said on irc: OH YEAH!
Attachment #8758993 - Flags: review?(mh+mozilla) → review+
https://reviewboard.mozilla.org/r/57098/#review53874

::: tools/mercurial/mach_commands.py:47
(Diff revision 1)
> -
> -        state_path = os.path.join(state_dir, 'setup.lastcheck')
> -
> -        with open(state_path, 'a'):
> -            os.utime(state_path, None)
>  

Just noticed in the next patch that you need to remove an extra empty line here.
Comment on attachment 8758994 [details]
Bug 1277406 - Move `mach mercurial-setup` implementation into bootstrap;

https://reviewboard.mozilla.org/r/57100/#review53876

Thanks to mozreview for not showing the content of deleted file and cross-file block moves.
Attachment #8758994 - Flags: review?(mh+mozilla) → review+
Attachment #8758995 - Flags: review?(mh+mozilla)
Comment on attachment 8758995 [details]
Bug 1277406 - Prompt to create the state directory;

https://reviewboard.mozilla.org/r/57102/#review53878

::: python/mozboot/mozboot/bootstrap.py:114
(Diff revision 1)
>      'Elementary',
>      '"elementary OS"',
>  )
>  
>  
> +def get_state_dir():

It's not clear to me why you need this here, since the existing check is in mach_bootstrap.py.
Comment on attachment 8758996 [details]
Bug 1277406 - Offer to configure Mercurial during bootstrap;

https://reviewboard.mozilla.org/r/57104/#review53880

::: python/mozboot/mozboot/bootstrap.py:210
(Diff revision 1)
>          self.instance.install_system_packages()
>  
>          # Like 'install_browser_packages' or 'install_mobile_android_packages'.
>          getattr(self.instance, 'install_%s_packages' % application)()
>  
> -        self.instance.ensure_mercurial_modern()
> +        hg_installed, hg_modern = self.instance.ensure_mercurial_modern()

I'm a little put off by mercurial being pushed by mach bootstrap, but this is not something this patch is changing...
Attachment #8758996 - Flags: review?(mh+mozilla)
https://reviewboard.mozilla.org/r/57102/#review53878

> It's not clear to me why you need this here, since the existing check is in mach_bootstrap.py.

Keep in mind there are 2 ways to run bootstrap: as a standalone tool and via `mach bootstrap` once you have the source tree.

The additions here and in this series are all about making the standalone invocation do more things before a source directory is available. The end goal is I want `mach bootstrap` to offer to clone the repository and more easily transition into configuring a build.
https://reviewboard.mozilla.org/r/57104/#review53880

> I'm a little put off by mercurial being pushed by mach bootstrap, but this is not something this patch is changing...

I would like bootstrap to offer to clone via git-cinnabar some day. I would also like to see a Git config wizard in the spirit of `mach mercurial-setup`. We kinda/sorta have the start of that in `git mozreview configure`...
Comment on attachment 8758942 [details]
configobj: vendor configobj 4.7.2;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57024/diff/2-3/
Attachment #8758942 - Attachment description: MozReview Request: configobj: vendor configobj 4.7.2; r?smacleod → configobj: vendor configobj 4.7.2;
Attachment #8758943 - Attachment description: MozReview Request: hgext: add configobj to sys.path in extensions; r?smacleod → hgext: add configobj to sys.path in extensions;
Attachment #8758944 - Attachment description: MozReview Request: configwizard: import files from mozilla-central (bug 1277406); r?smacleod → configwizard: import files from mozilla-central (bug 1277406);
Attachment #8758945 - Attachment description: MozReview Request: configwizard: initial Mercurial extension implementation (bug 1277406); r?smacleod → configwizard: initial Mercurial extension implementation (bug 1277406);
Attachment #8758946 - Attachment description: MozReview Request: configwizard: remove parsing of config from legacy code (bug 1277406); r?smacleod → configwizard: remove parsing of config from legacy code (bug 1277406);
Attachment #8758947 - Attachment description: MozReview Request: configwizard: prompt for username; implement config saving (bug 1277406); r?smacleod → configwizard: prompt for username; implement config saving (bug 1277406);
Attachment #8758948 - Attachment description: MozReview Request: configwizard: add support for setting optimal diff settings (bug 1277406); r?smacleod → configwizard: add support for setting optimal diff settings (bug 1277406);
Attachment #8758949 - Attachment description: MozReview Request: configwizard: prompt to enable color extension (bug 1277406); r?smacleod → configwizard: prompt to enable color extension (bug 1277406);
Attachment #8758950 - Attachment description: MozReview Request: configwizard: prompt for enabling history editing extensions (bug 1277406); r?smacleod → configwizard: prompt for enabling history editing extensions (bug 1277406);
Attachment #8758951 - Attachment description: MozReview Request: configwizard: remove code for enabling progress extension (bug 1277406); r?smacleod → configwizard: remove code for enabling progress extension (bug 1277406);
Attachment #8758952 - Attachment description: MozReview Request: configwizard: remove code for bundleclone and clonebundles (bug 1277406); r?smacleod → configwizard: remove code for bundleclone and clonebundles (bug 1277406);
Attachment #8758953 - Attachment description: MozReview Request: configwizard: prompt to install fsmonitor extension (bug 1277406); r?smacleod → configwizard: prompt to install fsmonitor extension (bug 1277406);
Attachment #8758954 - Attachment description: MozReview Request: configwizard: remove code for bzpost extension (bug 1277406); r?smacleod → configwizard: remove code for bzpost extension (bug 1277406);
Attachment #8758955 - Attachment description: MozReview Request: configwizard: prompt to install the firefoxtree extension (bug 1277406); r?smacleod → configwizard: prompt to install the firefoxtree extension (bug 1277406);
Attachment #8758956 - Attachment description: MozReview Request: configwizard: prompt to install and configure code review extensions (bug 1277406); r?smacleod → configwizard: prompt to install and configure code review extensions (bug 1277406);
Attachment #8758957 - Attachment description: MozReview Request: configwizard: prompt to install push-to-try (bug 1277406); r?smacleod → configwizard: prompt to install push-to-try (bug 1277406);
Attachment #8758958 - Attachment description: MozReview Request: configwizard: prompt to configure wip (bug 1277406); r?smacleod → configwizard: prompt to configure wip (bug 1277406);
Attachment #8758959 - Attachment description: MozReview Request: configwizard: set [hostfingerprints] when necessary (bug 1277406); r?smacleod → configwizard: set [hostfingerprints] when necessary (bug 1277406);
Attachment #8758960 - Attachment description: MozReview Request: configwizard: port file permissions checking (bug 1277406); r?smacleod → configwizard: port file permissions checking (bug 1277406);
Attachment #8758961 - Attachment description: MozReview Request: configwizard: remove some unused code from wizard.py (bug 1277406); r?smacleod → configwizard: remove some unused code from wizard.py (bug 1277406);
Attachment #8758962 - Attachment description: MozReview Request: configwizard: check for multiple version-control-tools directories (bug 1277406); r?smacleod → configwizard: check for multiple version-control-tools directories (bug 1277406);
Attachment #8758963 - Attachment description: MozReview Request: configwizard: remove last remnants of legacy hgsetup code (bug 1277406); r?smacleod → configwizard: remove last remnants of legacy hgsetup code (bug 1277406);
Attachment #8758942 - Flags: review?(smacleod) → review?(glob)
Attachment #8758943 - Flags: review?(smacleod) → review?(glob)
Attachment #8758944 - Flags: review?(smacleod) → review?(glob)
Attachment #8758945 - Flags: review?(smacleod) → review?(glob)
Attachment #8758946 - Flags: review?(smacleod) → review?(glob)
Attachment #8758947 - Flags: review?(smacleod) → review?(glob)
Attachment #8758948 - Flags: review?(smacleod) → review?(glob)
Attachment #8758949 - Flags: review?(smacleod) → review?(glob)
Attachment #8758950 - Flags: review?(smacleod) → review?(glob)
Attachment #8758951 - Flags: review?(smacleod) → review?(glob)
Attachment #8758952 - Flags: review?(smacleod) → review?(glob)
Attachment #8758953 - Flags: review?(smacleod) → review?(glob)
Attachment #8758954 - Flags: review?(smacleod) → review?(glob)
Attachment #8758955 - Flags: review?(smacleod) → review?(glob)
Attachment #8758956 - Flags: review?(smacleod) → review?(glob)
Attachment #8758957 - Flags: review?(smacleod) → review?(glob)
Attachment #8758958 - Flags: review?(smacleod) → review?(glob)
Attachment #8758959 - Flags: review?(smacleod) → review?(glob)
Attachment #8758960 - Flags: review?(smacleod) → review?(glob)
Attachment #8758961 - Flags: review?(smacleod) → review?(glob)
Attachment #8758962 - Flags: review?(smacleod) → review?(glob)
Attachment #8758963 - Flags: review?(smacleod) → review?(glob)
Comment on attachment 8758943 [details]
hgext: add configobj to sys.path in extensions;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57026/diff/2-3/
Comment on attachment 8758944 [details]
configwizard: import files from mozilla-central (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57028/diff/2-3/
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57030/diff/2-3/
Comment on attachment 8758946 [details]
configwizard: remove parsing of config from legacy code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57032/diff/2-3/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/4-5/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/4-5/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/4-5/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/4-5/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/4-5/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/4-5/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/4-5/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/4-5/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/4-5/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/4-5/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/4-5/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/4-5/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/4-5/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/4-5/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/4-5/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/4-5/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/4-5/
Comment on attachment 8758942 [details]
configobj: vendor configobj 4.7.2;

https://reviewboard.mozilla.org/r/57024/#review55258
Attachment #8758942 - Flags: review?(glob) → review+
Comment on attachment 8758943 [details]
hgext: add configobj to sys.path in extensions;

https://reviewboard.mozilla.org/r/57026/#review55260
Attachment #8758943 - Flags: review?(glob) → review+
Attachment #8758944 - Flags: review?(glob) → review+
i'm interested in see how this interacts with changes to mozilla-central.
can you point me to the bugs that track the changes there?  this will help with before/after testing to make sure things work as expected.

are you planning on this landing before |mach bootstrap| can clone vct?  or is the plan to ask new contributors to clone vct in addition to m-c?


once this lands i'd love to see it hooked up to vct's mozreview mach wrapper, as setting up mercurial for mozreview-only devs is useful.  but that's a story for another bug.
Flags: needinfo?(gps)
(In reply to Byron Jones ‹:glob› from comment #115)
> i'm interested in see how this interacts with changes to mozilla-central.

sorry; somehow i missed the other review series here.
Flags: needinfo?(gps)
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

https://reviewboard.mozilla.org/r/57030/#review55420

::: hgext/configwizard/__init__.py:75
(Diff revision 3)
> +
> +    if hgversion < MINIMUM_SUPPORTED_VERSION:
> +        ui.warn(VERSION_TOO_OLD)
> +        raise error.Abort('upgrade Mercurial then run again')
> +
> +    ui.prompt(INITIAL_MESSAGE, default='<RETURN>')

displaying large multi-line blocks of text as the prompt can make it harder to read due to it being a wall of yellow text.

ui.writing most of the text then prompting just the last line looks better.

this applies it to all places where multi-line text is used in ui.prompt()
Attachment #8758945 - Flags: review?(glob)
Comment on attachment 8758946 [details]
configwizard: remove parsing of config from legacy code (bug 1277406);

https://reviewboard.mozilla.org/r/57032/#review55422
Attachment #8758946 - Flags: review?(glob) → review+
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

https://reviewboard.mozilla.org/r/57034/#review55424
Attachment #8758947 - Flags: review?(glob) → review+
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

https://reviewboard.mozilla.org/r/57036/#review55428

::: hgext/configwizard/__init__.py:171
(Diff revision 5)
> +    showfunc = ui.configbool('diff', 'showfunc')
> +
> +    if git and showfunc:
> +        return
> +
> +    if not ui.promptchoice(BAD_DIFF_SETTINGS):

multi-line text in ui.prompt
Attachment #8758948 - Flags: review?(glob)
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

https://reviewboard.mozilla.org/r/57038/#review55430
Attachment #8758949 - Flags: review?(glob) → review+
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

https://reviewboard.mozilla.org/r/57040/#review55432
Attachment #8758950 - Flags: review?(glob) → review+
https://reviewboard.mozilla.org/r/57034/#review55434

::: hgext/configwizard/__init__.py:203
(Diff revision 5)
> +                    # Mercurial has special syntax to include other files.
> +                    # ConfigObj doesn't recognize it. Normalize on read and
> +                    # restore on write to preserve it.

there should be a test for %include handling
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

https://reviewboard.mozilla.org/r/57042/#review55438
Attachment #8758951 - Flags: review?(glob) → review+
https://reviewboard.mozilla.org/r/57044/#review55440

::: hgext/configwizard/hgsetup/config.py
(Diff revision 5)
> -        try:
> -            del ext['bundleclone']
> -        except KeyError:
> -            pass

would it be problematic if someone has both bundleclone and clonebundles installed?
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

https://reviewboard.mozilla.org/r/57046/#review55442

::: hgext/configwizard/__init__.py:256
(Diff revision 5)
> +
> +        return
> +
> +    # Mercurial 3.8+ has fsmonitor built-in.
> +    if hgversion >= (3, 8, 0):
> +        _promptnativeextension(ui, cw, 'fsmonitor', FSMONITOR_INFO)

multi-line prompt text
Attachment #8758953 - Flags: review?(glob)
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

https://reviewboard.mozilla.org/r/57048/#review55444
Attachment #8758954 - Flags: review?(glob) → review+
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

https://reviewboard.mozilla.org/r/57050/#review55266

::: hgext/configwizard/__init__.py:179
(Diff revision 5)
>  
>      if 'fsmonitor' in runsteps:
>          _checkfsmonitor(ui, cw, hgversion)
>  
> +    if 'firefoxtree' in runsteps:
> +        _promptvctextension(ui, cw, 'firefoxtree', FIREFOXTREE_INFO)

multi-line prompt text

::: hgext/configwizard/tests/test-firefoxtree.t:86
(Diff revision 5)
> +  Would you like to see a diff of the changes first (Yn)?  y
> +  --- hgrc.old
> +  +++ hgrc.new
> +  @@ -0,0 +1,2 @@
> +  +[extensions]
> +  +firefoxtree = /home/gps/src/version-control-tools/hgext/firefoxtree

(glob) the path.

::: hgext/configwizard/tests/test-firefoxtree.t:92
(Diff revision 5)
> +  
> +  Write changes to hgrc file (Yn)?  y
> +
> +  $ cat .hgrc
> +  [extensions]
> +  firefoxtree = /home/gps/src/version-control-tools/hgext/firefoxtree

(glob) the path.
Attachment #8758955 - Flags: review?(glob)
Attachment #8758956 - Flags: review?(glob)
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

https://reviewboard.mozilla.org/r/57052/#review55264

::: hgext/configwizard/__init__.py:391
(Diff revision 5)
> +
> +    if ui.promptchoice('Will you be submitting commits to Mozilla (Yn)? $$ &Yes $$ &No'):
> +        return
> +
> +    confrb = False
> +    answer = ui.promptchoice(CODEREVIEW_INFO, default=0) + 1

multi-line prompt text

::: hgext/configwizard/__init__.py:431
(Diff revision 5)
> +        try:
> +            del cw.c['bugzilla'][c]
> +        except KeyError:
> +            pass
> +
> +    # TODO configure mozilla.ircnick and the "review" path

given mozilla.ircnick is required for rb to work, i think it's worth prompting for that now.

::: hgext/configwizard/tests/test-codereview.t:69
(Diff revision 5)
> +  Would you like to see a diff of the changes first (Yn)?  y
> +  --- hgrc.old
> +  +++ hgrc.new
> +  @@ -0,0 +1,2 @@
> +  +[extensions]
> +  +reviewboard = /home/gps/src/version-control-tools/hgext/reviewboard/client.py

(glob) the path.

::: hgext/configwizard/tests/test-codereview.t:75
(Diff revision 5)
> +  
> +  Write changes to hgrc file (Yn)?  y
> +
> +  $ cat .hgrc
> +  [extensions]
> +  reviewboard = /home/gps/src/version-control-tools/hgext/reviewboard/client.py

(glob) the path.

::: hgext/configwizard/tests/test-codereview.t:134
(Diff revision 5)
> +  --- hgrc.old
> +  +++ hgrc.new
> +  @@ -1,2 +1,6 @@
> +   [extensions]
> +   reviewboard = /home/gps/src/version-control-tools/hgext/reviewboard/client.py
> +  +bzexport = /home/gps/src/version-control-tools/hgext/bzexport

(glob) the path.

::: hgext/configwizard/tests/test-codereview.t:215
(Diff revision 5)
> +   reviewboard = /home/gps/src/version-control-tools/hgext/reviewboard/client.py
> +   bzexport = /home/gps/src/version-control-tools/hgext/bzexport

(glob) the paths.
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

https://reviewboard.mozilla.org/r/57054/#review55268

::: hgext/configwizard/__init__.py:247
(Diff revision 5)
>  
>      if 'codereview' in runsteps:
>          _checkcodereview(ui, cw)
>  
> +    if 'pushtotry' in runsteps:
> +        _promptvctextension(ui, cw, 'push-to-try', PUSHTOTRY_INFO)

multi-line prompt text

::: hgext/configwizard/tests/test-push-to-try.t:60
(Diff revision 5)
> +  Would you like to see a diff of the changes first (Yn)?  y
> +  --- hgrc.old
> +  +++ hgrc.new
> +  @@ -0,0 +1,2 @@
> +  +[extensions]
> +  +push-to-try = /home/gps/src/version-control-tools/hgext/push-to-try

(glob) the path.

::: hgext/configwizard/tests/test-push-to-try.t:66
(Diff revision 5)
> +  
> +  Write changes to hgrc file (Yn)?  y
> +
> +  $ cat .hgrc
> +  [extensions]
> +  push-to-try = /home/gps/src/version-control-tools/hgext/push-to-try

(glob) the path.
Attachment #8758957 - Flags: review?(glob)
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

https://reviewboard.mozilla.org/r/57056/#review55448
Attachment #8758958 - Flags: review?(glob) → review+
Attachment #8758959 - Flags: review?(glob)
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

https://reviewboard.mozilla.org/r/57058/#review55262

::: hgext/configwizard/__init__.py:488
(Diff revision 5)
> +    # certificates in Mercurial config files. In modern versions of
> +    # Mercurial, the system CA store is used and old, legacy TLS protocols
> +    # are disabled. The default connection/security setting should
> +    # be sufficient and pinning certificates is no longer needed.
> +    modernssl = hasattr(ssl, 'SSLContext')
> +    if hgversion < (3, 4, 0) or not modernssl:

our min version is 3.5.0; there's no need to check for < 3.4.0 anymore.
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

https://reviewboard.mozilla.org/r/57060/#review55450

::: hgext/configwizard/__init__.py:607
(Diff revision 5)
> +    if sys.platform == 'win32':
> +        return
> +
> +    mode = os.stat(cw.path).st_mode
> +    if mode & (stat.S_IRWXG | stat.S_IRWXO):
> +        if ui.promptchoice(FILE_PERMISSIONS_WARNING):

multi-line prompt text
Attachment #8758960 - Flags: review?(glob)
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

https://reviewboard.mozilla.org/r/57062/#review55452
Attachment #8758961 - Flags: review?(glob) → review+
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

https://reviewboard.mozilla.org/r/57064/#review55456

::: hgext/configwizard/__init__.py:601
(Diff revision 5)
> +        i = v.index('version-control-tools')
> +        vct = v[0:i + len('version-control-tools')]
> +        seenvct.add(os.path.realpath(os.path.expanduser(vct)))
> +
> +    if len(seenvct) > 1:
> +        print(MULTIPLE_VCT % cw.path)

i suspect you want ui.write() instead pf print() here
Attachment #8758962 - Flags: review?(glob)
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

https://reviewboard.mozilla.org/r/57066/#review55458
Attachment #8758963 - Flags: review?(glob) → review+
https://reviewboard.mozilla.org/r/57030/#review55420

> displaying large multi-line blocks of text as the prompt can make it harder to read due to it being a wall of yellow text.
> 
> ui.writing most of the text then prompting just the last line looks better.
> 
> this applies it to all places where multi-line text is used in ui.prompt()

Good catch.
https://reviewboard.mozilla.org/r/57044/#review55440

> would it be problematic if someone has both bundleclone and clonebundles installed?

No. Code in bundleclone deactivates itself if the Mercurial client has clonebundles support.
https://reviewboard.mozilla.org/r/57052/#review55264

> given mozilla.ircnick is required for rb to work, i think it's worth prompting for that now.

My goal is to do a straight port first.

One of the reasons I left this out is because I want to try connecting to BMO using the user-supplied API key. Both to verify it works (we've had reports of people not specifying a working API key) and to extract the IRC nick from the Bugzilla name field. Since we're running tests from v-c-t, we should be able to stand up a BMO instance in the test pretty easily...
Comment on attachment 8758942 [details]
configobj: vendor configobj 4.7.2;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57024/diff/3-4/
Attachment #8758945 - Flags: review?(glob)
Attachment #8758948 - Flags: review?(glob)
Attachment #8758953 - Flags: review?(glob)
Attachment #8758955 - Flags: review?(glob)
Attachment #8758956 - Flags: review?(glob)
Attachment #8758957 - Flags: review?(glob)
Attachment #8758959 - Flags: review?(glob)
Attachment #8758960 - Flags: review?(glob)
Attachment #8758962 - Flags: review?(glob)
Comment on attachment 8758943 [details]
hgext: add configobj to sys.path in extensions;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57026/diff/3-4/
Comment on attachment 8758944 [details]
configwizard: import files from mozilla-central (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57028/diff/3-4/
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57030/diff/3-4/
Comment on attachment 8758946 [details]
configwizard: remove parsing of config from legacy code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57032/diff/3-4/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/5-6/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/5-6/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/5-6/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/5-6/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/5-6/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/5-6/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/5-6/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/5-6/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/5-6/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/5-6/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/5-6/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/5-6/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/5-6/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/5-6/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/5-6/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/5-6/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/5-6/
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

https://reviewboard.mozilla.org/r/57030/#review55578
Attachment #8758945 - Flags: review?(glob) → review+
Attachment #8758948 - Flags: review?(glob) → review+
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

https://reviewboard.mozilla.org/r/57036/#review55580
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

https://reviewboard.mozilla.org/r/57044/#review55582
Attachment #8758952 - Flags: review?(glob) → review+
Attachment #8758953 - Flags: review?(glob) → review+
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

https://reviewboard.mozilla.org/r/57046/#review55584
Attachment #8758955 - Flags: review?(glob) → review+
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

https://reviewboard.mozilla.org/r/57050/#review55586
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

https://reviewboard.mozilla.org/r/57052/#review55588
Attachment #8758956 - Flags: review?(glob) → review+
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

https://reviewboard.mozilla.org/r/57054/#review55590
Attachment #8758957 - Flags: review?(glob) → review+
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

https://reviewboard.mozilla.org/r/57058/#review55592
Attachment #8758959 - Flags: review?(glob) → review+
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

https://reviewboard.mozilla.org/r/57060/#review55594
Attachment #8758960 - Flags: review?(glob) → review+
Attachment #8758962 - Flags: review?(glob) → review+
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

https://reviewboard.mozilla.org/r/57064/#review55596

\o/
Comment on attachment 8758942 [details]
configobj: vendor configobj 4.7.2;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57024/diff/4-5/
Comment on attachment 8758943 [details]
hgext: add configobj to sys.path in extensions;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57026/diff/4-5/
Comment on attachment 8758944 [details]
configwizard: import files from mozilla-central (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57028/diff/4-5/
Comment on attachment 8758945 [details]
configwizard: initial Mercurial extension implementation (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57030/diff/4-5/
Comment on attachment 8758946 [details]
configwizard: remove parsing of config from legacy code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57032/diff/4-5/
Comment on attachment 8758947 [details]
configwizard: prompt for username; implement config saving (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57034/diff/6-7/
Comment on attachment 8758948 [details]
configwizard: add support for setting optimal diff settings (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57036/diff/6-7/
Comment on attachment 8758949 [details]
configwizard: prompt to enable color extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57038/diff/6-7/
Comment on attachment 8758950 [details]
configwizard: prompt for enabling history editing extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57040/diff/6-7/
Comment on attachment 8758951 [details]
configwizard: remove code for enabling progress extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57042/diff/6-7/
Comment on attachment 8758952 [details]
configwizard: remove code for bundleclone and clonebundles (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57044/diff/6-7/
Comment on attachment 8758953 [details]
configwizard: prompt to install fsmonitor extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57046/diff/6-7/
Comment on attachment 8758954 [details]
configwizard: remove code for bzpost extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57048/diff/6-7/
Comment on attachment 8758955 [details]
configwizard: prompt to install the firefoxtree extension (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57050/diff/6-7/
Comment on attachment 8758956 [details]
configwizard: prompt to install and configure code review extensions (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57052/diff/6-7/
Comment on attachment 8758957 [details]
configwizard: prompt to install push-to-try (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57054/diff/6-7/
Comment on attachment 8758958 [details]
configwizard: prompt to configure wip (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57056/diff/6-7/
Comment on attachment 8758959 [details]
configwizard: set [hostfingerprints] when necessary (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57058/diff/6-7/
Comment on attachment 8758960 [details]
configwizard: port file permissions checking (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57060/diff/6-7/
Comment on attachment 8758961 [details]
configwizard: remove some unused code from wizard.py (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57062/diff/6-7/
Comment on attachment 8758962 [details]
configwizard: check for multiple version-control-tools directories (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57064/diff/6-7/
Comment on attachment 8758963 [details]
configwizard: remove last remnants of legacy hgsetup code (bug 1277406);

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57066/diff/6-7/
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/306a957796de
configwizard: import files from mozilla-central ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/824f78b74941
configwizard: initial Mercurial extension implementation ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/d354d38600cd
configwizard: remove parsing of config from legacy code ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b452920efd3c
configwizard: prompt for username; implement config saving ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6965b178ad25
configwizard: add support for setting optimal diff settings ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/fd0ffa74cec6
configwizard: prompt to enable color extension ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/4d6869c776ac
configwizard: prompt for enabling history editing extensions ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/77ba90151ee0
configwizard: remove code for enabling progress extension ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/73c6b4e78f7a
configwizard: remove code for bundleclone and clonebundles ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6098a9a3d3ff
configwizard: prompt to install fsmonitor extension ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/66b6c9b10287
configwizard: remove code for bzpost extension ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b5404e1a3028
configwizard: prompt to install the firefoxtree extension ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/ea492a334043
configwizard: prompt to install and configure code review extensions ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/fa751dfe16e1
configwizard: prompt to install push-to-try ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/5fb0e772037f
configwizard: prompt to configure wip ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/b03b3747d0b8
configwizard: set [hostfingerprints] when necessary ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/1d6c24ee6478
configwizard: port file permissions checking ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/41b9df193e9b
configwizard: remove some unused code from wizard.py ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/2fe6ff0628f1
configwizard: check for multiple version-control-tools directories ; r=glob
https://hg.mozilla.org/hgcustom/version-control-tools/rev/2bd23fbed26f
configwizard: remove last remnants of legacy hgsetup code ; r=glob
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Still have the mach series to land.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
The Mercurial setup wizard has now been ported to the version-control-tools
repository, where it has testing and integrates better with Mercurial
configs.

The bootstrapper has been taught how to invoke the new version of the
Mercurial setup wizard.

This commit switched `mach mercurial-setup` to call the bootstrapper
code for invoking the Mercurial setup wizard from version-control-tools.
As of this commit, the Mercurial setup wizard in tools/mercurial is
unused.

Review commit: https://reviewboard.mozilla.org/r/58900/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58900/
Attachment #8758993 - Attachment description: MozReview Request: Bug 1277406 - Remove nagging to run `mach mercurial-setup` from mach; r?glandium → Bug 1277406 - Remove nagging to run `mach mercurial-setup` from mach;
Attachment #8758994 - Attachment description: MozReview Request: Bug 1277406 - Move `mach mercurial-setup` implementation into bootstrap; r?glandium → Bug 1277406 - Move `mach mercurial-setup` implementation into bootstrap;
Attachment #8758995 - Attachment description: MozReview Request: Bug 1277406 - Prompt to create the state directory; r?glandium → Bug 1277406 - Prompt to create the state directory;
Attachment #8758996 - Attachment description: MozReview Request: INCOMPLETE Bug 1277406 - Offer to configure Mercurial during bootstrap; r?glandium → Bug 1277406 - Offer to configure Mercurial during bootstrap;
Attachment #8761861 - Flags: review?(mh+mozilla)
Attachment #8761862 - Flags: review?(mh+mozilla)
Attachment #8761863 - Flags: review?(mh+mozilla)
Attachment #8758995 - Flags: review?(mh+mozilla)
Attachment #8758996 - Flags: review?(mh+mozilla)
The wizard has been ported to the version-control-tools repository
and in-tree consumers have been switched to consume it from there. This
code is now dead. Kill it.

References to the now-defunct code have been removed/updated.

Review commit: https://reviewboard.mozilla.org/r/58902/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58902/
I've always been bothered that the one-line bootstrap configures your system
then leaves you on the hook to clone source code and configure the build
system. I'd like for there to be an easy transition and a wizard that
guides you through from end to end.

This commit addresses part of the disconnect by offering to clone the
Mercurial source repository at the end of bootstrap.

We only offer to clone if we aren't running from a source checkout
(likely the one-line bootstrap invocation) and if we are in interactive
mode.

We clone from https://hg.mozilla.org/firefox - a unified Firefox repo. We
attempt to perform a streaming clone, because this will likely be the
fastest and will result in the local repository having optimal delta
chains and performance. This is ~500 MB larger than a gzip bundle and
~150 MB larger than a mozilla-central gzip bundle (the latter is likely
what is being downloaded by most users today). I think the extra 150 MB
for all changesets is beneficial to users: we want to encourage people
to use the unified repo going forward because the separate repos are not
needed.

Again, I'd like to eventually offer Git support here. Again, Mercurial is
canonical and you have to start somewhere.

Review commit: https://reviewboard.mozilla.org/r/58904/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58904/
Comment on attachment 8758993 [details]
Bug 1277406 - Remove nagging to run `mach mercurial-setup` from mach;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57098/diff/1-2/
Comment on attachment 8758994 [details]
Bug 1277406 - Move `mach mercurial-setup` implementation into bootstrap;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57100/diff/1-2/
Comment on attachment 8758995 [details]
Bug 1277406 - Prompt to create the state directory;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57102/diff/1-2/
Comment on attachment 8758996 [details]
Bug 1277406 - Offer to configure Mercurial during bootstrap;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57104/diff/1-2/
Comment on attachment 8758995 [details]
Bug 1277406 - Prompt to create the state directory;

https://reviewboard.mozilla.org/r/57102/#review55810

::: python/mozboot/mozboot/bootstrap.py:64
(Diff revision 2)
>      browser=APPLICATIONS_LIST[0],
>      mobile_android_artifact_mode=APPLICATIONS_LIST[1],
>      mobile_android=APPLICATIONS_LIST[2],
>  )
>  
> +STATE_DIR_INFO = '''

I'm still not clear why this whole thing needs to be duplicated. Why not import those bits from mach_bootstrap.py instead of duplicating them?
Attachment #8758995 - Flags: review?(mh+mozilla)
Comment on attachment 8758996 [details]
Bug 1277406 - Offer to configure Mercurial during bootstrap;

https://reviewboard.mozilla.org/r/57104/#review55814
Attachment #8758996 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8761861 [details]
Bug 1277406 - Use the bootstrapper code for `mach mercurial-setup`;

https://reviewboard.mozilla.org/r/58900/#review55816

::: python/mozboot/mozboot/mach_commands.py:58
(Diff revision 1)
>          if update_only:
> -            from hgsetup.update import MercurialUpdater
> -            updater = MercurialUpdater(self._context.state_dir)
> +            bootstrap.update_vct(hg, self._context.state_dir)
> +            return
> -            result = updater.update_all()
> -        else:
> -            from hgsetup.wizard import MercurialSetupWizard
> -            wizard = MercurialSetupWizard(self._context.state_dir)
> -            result = wizard.run(map(os.path.expanduser, config_paths))
> -
> -        if result:
> -            print('(despite the failure, mach will not nag you to run '
> -                  '`mach mercurial-setup`)')
>  
> -        return result
> +        bootstrap.configure_mercurial(hg, self._context.state_dir)

I'm not particularly a fan of the
if ...:
   foo
   return
bar

form when there is nothing after bar.

if ...:
   foo
else:
   bar

is the same number of lines, after all.
Attachment #8761861 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8761862 [details]
Bug 1277406 - Delete now-unused Mercurial setup wizard;

https://reviewboard.mozilla.org/r/58902/#review55818
Attachment #8761862 - Flags: review?(mh+mozilla) → review+
Attachment #8761863 - Flags: review?(mh+mozilla)
Comment on attachment 8761863 [details]
Bug 1277406 - Offer to clone Firefox source repo during bootstrap;

https://reviewboard.mozilla.org/r/58904/#review55820

::: python/mozboot/mozboot/bootstrap.py:91
(Diff revision 1)
> -obtain a copy of the source code by running:
> +'''
> +
> +SOURCE_ADVERTISE = '''
> +Source code can be obtained by running
>  
> -    hg clone https://hg.mozilla.org/mozilla-central
> +    hg clone https://hg.mozilla.org/firefox

Can we not put all eggs in the same basket, and leave the cloning from the unified repo to a separate bug?

::: python/mozboot/mozboot/bootstrap.py:263
(Diff revision 1)
> +        # Offer to clone if we're not inside a clone.
> +        checkout_type = current_vcs()
> +        have_clone = False
> +
> +        if checkout_type:
> +            have_clone = True

The funny thing is that the command might as well have been executed from a git or hg clone of something else. It's not entirely far fetched considering people are putting they $HOME under git.

Perfect enemy of done etc. but we should have a followup filed to figure out at least part of a response to that. I'm thinking checking the remotes urls, and if there's something with hg.mozilla.org or github.com/mozilla/, skip?

::: python/mozboot/mozboot/bootstrap.py:347
(Diff revision 1)
> +def clone_firefox(hg, dest):
> +    """Clone the Firefox repository to a specified destination."""
> +    print('Cloning Firefox Mercurial repository to %s' % dest)
> +
> +    try:
> +        subprocess.check_call([hg, 'config', 'ui.clonebundleprefers'])

Won't this output the value of ui.clonebundleprefers if it's set?

::: python/mozboot/mozboot/bootstrap.py:354
(Diff revision 1)
> +    # Prefer an uncompressed clone because the delta chains on the server
> +    # are optimal and will be preserved on the client, unlike with a gzip
> +    # clone.
> +    if not have_bundle_prefers:
> +        args.extend(['--config', 'ui.clonebundleprefers=VERSION=packed1'])

I'm not sure how to reconcile, from the commit message, how 500M larger download can equate to faster clone. That might be true for people in the Bay area, but it's likely not true for me, even though I have fiber.

::: python/mozboot/mozboot/bootstrap.py:389
(Diff revision 1)
> +        elif os.path.exists(git):
> +            return 'git'
> +
> +        path, child = os.path.split(path)
> +        if child == '':
> +            return None

break
https://reviewboard.mozilla.org/r/58904/#review55822

::: python/mozboot/mozboot/bootstrap.py:367
(Diff revision 1)
> +        '--noupdate',
> +        'https://hg.mozilla.org/firefox',
> +        dest,
> +    ])
> +
> +    subprocess.check_call(args)

The possible CalledProcessError exceptions won't be very user friendly if something goes wrong.
https://reviewboard.mozilla.org/r/58904/#review55948

Yeah, I'm fine moving this feature to another bug.
I never really liked this. Other people had even more visceral
reactions. Let's get rid of it.

The code for touching a file when it runs has also been removed because
the only thing it was used for was the nagging feature.

Review commit: https://reviewboard.mozilla.org/r/58982/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58982/
Attachment #8762104 - Flags: review?(mh+mozilla)
Attachment #8762105 - Flags: review?(mh+mozilla)
Attachment #8762106 - Flags: review?(mh+mozilla)
Attachment #8762107 - Flags: review?(mh+mozilla)
Attachment #8762108 - Flags: review?(mh+mozilla)
This begins the consolidation of `mach mercurial-setup` into
`mach bootstrap`. The first step is to move the content of the
mach_commands.py file into the bootstrapper's.

I'm not crazy about adding the sys.path entry for tools/mercurial.
I intend to clean this up later.

Review commit: https://reviewboard.mozilla.org/r/58984/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58984/
Currently, on first run of `mach` it prompts you to create a state
directory. The hand-off between bootstrap and `mach` has always
bothered me because bootstrap is supposed to get your system in a good
state.

In this commit, we teach the bootstrap tool to create the state
directory when not present. This duplicates functionality from `mach`.
The justification for the duplication is explained by inline comment.

In future commits, we'll build on this work to have the bootstrapper
run the Mercurial config wizard, which needs this state directory.

Review commit: https://reviewboard.mozilla.org/r/58986/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58986/
If a state directory is available and we're running in interactive mode
(or have been told otherwise), we now configure Mercurial during
bootstrap.

This consists of cloning version-control-tools to the state directory
(mimicking code in `mach mercurial-setup` today) and running the
config wizard from version-control-tools.

Code for cloning/updating repositories has been stolen from
tools/mercurial/hgsetup.

As the inline TODO notes, I'd like to eventually support
configuring Git during bootstrap. Since Mercurial is the canonical VCS
for Firefox and since we already have a Mercurial setup wizard (and
don't have a Git one yet), I don't think we should block on implementing
Git support.

Review commit: https://reviewboard.mozilla.org/r/58988/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58988/
The Mercurial setup wizard has now been ported to the version-control-tools
repository, where it has testing and integrates better with Mercurial
configs.

The bootstrapper has been taught how to invoke the new version of the
Mercurial setup wizard.

This commit switched `mach mercurial-setup` to call the bootstrapper
code for invoking the Mercurial setup wizard from version-control-tools.
As of this commit, the Mercurial setup wizard in tools/mercurial is
unused.

Review commit: https://reviewboard.mozilla.org/r/58990/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58990/
Attachment #8762104 - Attachment is obsolete: true
Attachment #8762104 - Flags: review?(mh+mozilla)
Attachment #8762105 - Attachment is obsolete: true
Attachment #8762105 - Flags: review?(mh+mozilla)
Attachment #8762106 - Attachment is obsolete: true
Attachment #8762106 - Flags: review?(mh+mozilla)
Attachment #8762107 - Attachment is obsolete: true
Attachment #8762107 - Flags: review?(mh+mozilla)
Attachment #8762108 - Attachment is obsolete: true
Attachment #8762108 - Flags: review?(mh+mozilla)
Comment on attachment 8758995 [details]
Bug 1277406 - Prompt to create the state directory;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57102/diff/2-3/
Attachment #8758995 - Flags: review?(mh+mozilla)
Comment on attachment 8758996 [details]
Bug 1277406 - Offer to configure Mercurial during bootstrap;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/57104/diff/2-3/
Comment on attachment 8761861 [details]
Bug 1277406 - Use the bootstrapper code for `mach mercurial-setup`;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58900/diff/1-2/
Comment on attachment 8761862 [details]
Bug 1277406 - Delete now-unused Mercurial setup wizard;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58902/diff/1-2/
Attachment #8761863 - Attachment is obsolete: true
Comment on attachment 8758995 [details]
Bug 1277406 - Prompt to create the state directory;

https://reviewboard.mozilla.org/r/57102/#review55956

Per irc, r+ on the condition that the code duplication is handled in a followup.
Attachment #8758995 - Flags: review?(mh+mozilla) → review+
Blocks: 1279563
Blocks: 1279564
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/14c82f33bc9a
Remove nagging to run `mach mercurial-setup` from mach; r=glandium
https://hg.mozilla.org/integration/mozilla-inbound/rev/cec0b6d316a9
Move `mach mercurial-setup` implementation into bootstrap; r=glandium
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4929a47dbe3
Prompt to create the state directory; r=glandium
https://hg.mozilla.org/integration/mozilla-inbound/rev/0ebec66be8cb
Offer to configure Mercurial during bootstrap; r=glandium
https://hg.mozilla.org/integration/mozilla-inbound/rev/b562b2a230b1
Use the bootstrapper code for `mach mercurial-setup`; r=glandium
https://hg.mozilla.org/integration/mozilla-inbound/rev/64255f3e255c
Delete now-unused Mercurial setup wizard; r=glandium
Blocks: 1279596
Depends on: 1280022
Blocks: 1281920
Blocks: 1281966
Duplicate of this bug: 1185354
Duplicate of this bug: 1194247
Duplicate of this bug: 1268578
Duplicate of this bug: 1185418
Duplicate of this bug: 1277442
Blocks: 1389417
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.