Commit Graph

75 Commits

Author SHA1 Message Date
Gregory Szorc
87248da2a3 Bug 1242678 - Disable mozext when running hg commands; r=dminor
We disable various extensions when running `hg` commands as part
of `mach mercurial-setup` because they can interfere with operations.
e.g. if the extension isn't compatible with your version of hg, you
will get an error.

For some reason "mozext" wasn't part of this list. Fix that.

DONTBUILD (NPOTB)
2016-01-25 12:15:46 -08:00
Andrew Halberstadt
13939b466c Bug 1234927 - Display fxheads in |hg wip| alias, r=gps 2015-12-23 15:38:08 -05:00
Gregory Szorc
34230b64ea Bug 1235921 - Update modern Mercurial version to 3.5.2; r=me
3.5.2 is what is listed in `mach mercurial-setup`. These should match.
Add a comment to each file saying to change both.
2015-12-31 16:01:48 -08:00
Dave Townsend
b9c08ee9b3 Bug 1230300: Add a hg extension that rejects changesets that fail to pass eslint. r=gps
This grabs the list of changed and added files that match the set we expect to
be able to lint and runs them through eslint displaying simple messages on error.
2015-12-11 09:11:49 -05:00
Gregory Szorc
b45a909ceb Bug 1225599 - Pull Mercurial repos with common 3rd party extensions disabled; r=dminor
Running old extensions with newer versions of Mercurial may crash `hg`
due to the old extension accessing something or doing something that has
been changed in the new release.

To minimize the risk of this happening, we disable common 3rd party
extensions when cloning or pulling as part of `mach mercurial-setup`. We
don't want to disable everything because some extensions (like
remotenames) provide features the user may want enabled as part of the
clone/update. This leaves the door open for more failures. Hopefully
this approach is sufficient. We can always revisit later.
2015-12-15 10:47:33 -08:00
Gregory Szorc
bebc2d4af8 Bug 1232747 - Check for ssl.SSLContext existence; r=dminor
ssl.SSLContext was added in 2.7.9. I thought it was present in earlier
versions and the extra cert foo was added in 2.7.9. Derp.
2015-12-15 11:26:20 -08:00
Gregory Szorc
24ce46566b Bug 1231989 - Prompt to install hgwatchman extension; r=ahal
This can speed up performance significantly.

Only support OS X for now because on Linux we have to adjust inode
limits to support mozilla-central and I don't feel like scope bloating.
2015-12-11 13:02:53 -05:00
Gregory Szorc
f216fb3af5 Bug 1231192 - Only install host fingerprints if not running secure Python+hg; r=smacleod
See inline comment.
2015-12-07 13:15:24 -08:00
Gregory Szorc
cc44661455 Bug 1231192 - Offer to install hg wip; r=smacleod 2015-12-07 13:22:49 -08:00
Gregory Szorc
dc28dfc19c Bug 1231192 - Support clonebundles feature; r=smacleod
bundleclone is the Mozilla-specific precursor to the "clonebundles"
feature in Mercurial 3.6. Change the wizard to recognize when
clonebundles is available and to favor it. Activating clonebundles will
also disable bundleclone, as bundleclone is redundant with clonebundles.
(If both are enabled, bundleclone detects this and gets out of the way.)
2015-12-07 13:03:17 -08:00
Gregory Szorc
a83a6676cc Bug 1231192 - Bump some minimum Mercurial version; r=smacleod
We only support the last 4 releases of Mercurial. 3.6 is out, which
means we only support down to 3.3.
2015-12-07 12:23:56 -08:00
Gregory Szorc
d051ee89dd Bug 1231192 - Mark Mercurial 3.5.2 as oldest non-legacy version; r=smacleod
Main reason for recommending 3.5 is bundle2. The protocol is faster and
we can do things like put extra data in the server exchange. It also
enables generaldelta to be exchanged without pain.

And of course there are tons of performance improvements and bug fixes.
2015-12-07 12:20:50 -08:00
Alex Jordan
5a141c9b7c Bug 1228580 - ./mach mercurial-setup should use ~ to set up extension paths, not my literal home directory. r=gps 2015-11-27 14:51:50 -08:00
Wes Kocher
0610613ed6 Bug 1218903 - Update bmo fingerprint. r=fubar, a=Tomcat 2015-10-27 10:50:45 -07:00
Gregory Szorc
0cbaaff5e7 Bug 1200461 - Prompt for Bugzilla API Key instead of password; r=smacleod
All extensions in version-control-tools should support Bugzilla API Keys
now. MozReview requires them. We'll likely remove support for passwords
and cookie auth in the future. This commit transitions the Mercurial
setup wizard to API Keys exclusively.

DONTBUILD (NPOTB)
2015-09-15 15:57:40 -07:00
Gregory Szorc
13d0319aa2 Bug 1195445 - Update host key fingerprint for bugzilla.mozilla.org
The certificate was updated to a SHA-2 certificate.

DONTBUILD (NPOTB)
2015-09-01 17:52:46 -07:00
Xidorn Quan
8ced822a30 Bug 1200458 - Skip permission check for .hgrc on Windows in hgsetup wizard. r=gps DONTBUILD 2015-09-01 10:22:45 +10:00
Birunthan Mohanathas
bb811b7b74 Bug 1197527 - Consolidate obtaining hg path into mozversioncontrol.get_hg_path; r=gps
DONTBUILD
2015-08-24 14:37:42 -04:00
Birunthan Mohanathas
0f6171ef93 Bug 1197527 - Always clone version-control-tools in MercurialSetupWizard; r=gps 2015-08-24 10:31:55 -07:00
Birunthan Mohanathas
83e3375f62 Bug 1197527 - Don't unnecessarily attempt to create extensions directory in MercurialUpdater; r=gps 2015-08-22 13:50:05 -07:00
Brian Smith
df9e714001 Bug 1188931 - Fix hgsetup wizard. r=gps 2015-07-29 13:59:18 -04:00
Gregory Szorc
fe1f8a50bc Bug 1184229 - Detect multiple version-control-tools repos in Mercurial config; r=smacleod
Having multiple version-control-tools repositories references in your
hgrc could lead to one repository importing code from another, depending
on how sys.path modification works from version-control-tools
repositories. Detect it and issue a warning.
2015-07-27 13:44:39 -07:00
Gregory Szorc
d28be73820 Bug 1185557 - Print relevant config options; r=smacleod
Users may want to know what the wizard is changing before they answer
prompts. Add the names of impacted config options to messages so people
can make more informed decisions.
2015-07-21 10:11:09 -07:00
Gregory Szorc
0360ef77e6 Bug 1185557 - Prompt about bzexport after reviewboard; r=smacleod
We want to encourage people to use reviewboard over bzexport.
2015-07-21 10:10:54 -07:00
Gregory Szorc
cdfe13a83e Bug 1185557 - Only prompt to install progress on Mercurial <3.5; r=smacleod
Progress is enabled by default in Mercurial 3.5. extensions.progress
no-ops. Don't prompt for it on newer Mercurial versions.
2015-07-21 10:10:38 -07:00
Gregory Szorc
0000c9f5dd Bug 1185562 - Print message saying the mercurial-setup failures unblock mach; r=smacleod
The messaging on this could be bikeshedded. Something is better than
nothing, that's for sure.
2015-07-21 10:09:49 -07:00
Gregory Szorc
2ff8337e5c Bug 1185112 - Don't prompt for Bugzilla username/password if cookies defined; r=smacleod
Before, we prompted for Bugzila username/password if the hgrc contained
credentials in cookie form. Don't do that.
2015-07-21 10:09:15 -07:00
Gregory Szorc
e50972c695 Bug 1185113 - Support setting more secure file permissions; r=smacleod
~/.hgrc files are likely created with the user's default umask, which
commonly gives default permissions of 644. If the hgrc config contains
sensitive information (such as Bugzilla credentials), these file
permissions could result in others stealing sensitive data.

Detect when the group and other file mode bits are set and prompt to
remove these permissions.
2015-07-21 10:08:24 -07:00
Gregory Szorc
17eb92f7c6 Bug 1185113 - Clarify language around Bugzilla credentials; r=smacleod
Bugzilla credentials are optional. Make this more obvious by adding
"optional" to the prompt.

Bugzilla credentials are stored in plain text. Explicitly call this out
in the help text so users can make informed decisions about whether to
capture the credentials.
2015-07-21 10:08:02 -07:00
Gregory Szorc
49c6fbc900 Bug 1178955 - Print line number for parse errors; r=smacleod
It helps users debug problems.
2015-07-17 10:29:22 -07:00
Gregory Szorc
b5b81141c3 Bug 1178955 - Error when semicolon comments are seen; r=smacleod
configobj doesn't support semicolon comments. Why, I don't know, since
they are pretty common in ini files.

Do a static check for semicolon comments and print a more actionable
error message.
2015-07-17 10:29:09 -07:00
Gregory Szorc
38d404cbc3 Bug 1178955 - Print config path on failure; r=smacleod
Actionable error messages are useful.
2015-07-17 10:28:55 -07:00
Gregory Szorc
f2c8048c64 Bug 1178955 - Refactor config path selection; r=smacleod
An upcoming commit will display the path of the config file in the error
message. In order to do this, the calling scope needs to know the path
to the config file.
2015-07-17 10:28:29 -07:00
Gregory Szorc
8eeccdd33f Bug 1178955 - Don't pass config paths to updater; r=smacleod
They aren't needed.
2015-07-17 10:28:12 -07:00
Gregory Szorc
c4a2bcd2b4 Bug 1183982 - Ensure state directory exists before touching state file; a=me
The creation of the directory used to be handled by the running of the
wizard. Now, since we touch the state file first, we need to create the
directory manually. Derp.
2015-07-15 00:42:03 -07:00
Gregory Szorc
9d05a6e264 Bug 1182677 - Add doctstring for mach mercurial-setup; r=smacleod
Mach grew support for docstrings in `mach help` output a few weeks ago.
Add a docstring for `mach mercurial-setup`.
2015-07-14 13:44:08 -07:00
Gregory Szorc
51d9d0fcb8 Bug 1182677 - Touch last check file before main command invocation; r=smacleod
While not common, there are a few cases where `mach mercurial-setup`
fails. When checking the last time this command was executed, it is
sufficient to record the intent to run the command, not the fact that it
executed to completion.
2015-07-14 13:42:02 -07:00
Gregory Szorc
4f2fb895aa Bug 1176642 - Use absolute_import in mach_commands.py files; r=glandium
This removes ambiguity as to which modules are being imported, making
import slightly faster as Python doesn't need to test so many
directories for file presence.

All files should already be using absolute imports because mach command
modules aren't imported to the package they belong to: they instead
belong to the "mach" package. So relative imports shouldn't have been
used.
2015-06-21 17:39:09 -07:00
Chris Manchester
e60514505c Bug 1162093 - Add "push-to-try" from version-control-tools to the mercurial setup wizard prompt.;r=gps 2015-06-02 20:41:29 -07:00
Gregory Szorc
d8aaae69e5 Bug 1168466 - Prompt to install bundleclone extension; r=smacleod
We're about to deploy this to release automation. We might as well have
normal people start using it as well. We could perhaps even have the
extension print out information on how to resume interrupted downloads
someday, so it will pay to have this enabled so they can utilize that
feature some day in the future.

DONTBUILD (NPOTB)
2015-05-26 10:07:32 -07:00
Gregory Szorc
515cf33d2f Bug 1168466 - Bump minimum Mercurial version; r=smacleod
We dropped support for Mercurial 3.0 in version-control-tools. Bump
minimum versions in extensions to reflect this.

We highly recommend people run a modern Mercurial. Bump the minimum
non-legacy version to reflect that.
2015-05-26 10:00:52 -07:00
Ed Morley
197b35e233 Bug 1164812 - mach mercurial-setup: Always mark the v-c-t repo as needing update
Currently we only mark the version-control-tools repo as needing updating, if
we did not pass a path param to prompt_external_extension(). This is because if
no path is passed, the extension is used from the version-control-tools repo,
and so if _no_ path is passed, it's presumed the extension is external to the
repo. However this is not always the case - eg if we need to specify a specific
file for an extension (vs the entire directory), we have to do so be passing in
the path. We hit this case for reviewboard.

With this change, we always mark the version-control-tools repo as needing an
update, no matter where the extension was located.
2015-05-19 09:41:38 +01:00
Ed Morley
434538f8ec Bug 978514 - mach mercurial-setup: Use mqext from the version-control-tools repo
mqext was moved into the version-control-tools repo some time ago, but mach
mercurial-setup was still pointing at the old repo location, which is no longer
being updated.
2015-05-19 09:41:38 +01:00
Gregory Szorc
8d63fd55fe Bug 1164315 - Update key fingerprint for bitbucket.org; r=me
Value obtained from
https://blog.bitbucket.org/2015/05/06/bitbuckets-ssl-certificate-is-changing-for-sha-2/
and verified to work.

DONTBUILD (NPOTB)
2015-05-12 20:21:47 -07:00
Gregory Szorc
40fd1c6f73 Bug 1128586 - Prefer hg.exe over hg; r=RyanVM
This is needed for compatibility with an upcoming release of
MozillaBuild, which distributes Mercurial as a Python package, not as a
standalone Windows program. As a result, it introduces "hg" into $PATH,
which "which" will happily prefer as the "hg" binary. This upsets
subprocess. So, we explicitly prefer "hg.exe" over "hg".

We could accomplish the same thing by calling which.whichall() and
sorting results. But this is more code and IMO not worth the effort to
implement.
2015-04-27 10:43:49 -07:00
Stéphane SCHMIDELY
b75e920d56 Bug 1144629 - UnicodeDecodeError in ./mach mercurial-setup. r=gps, r=glandium 2015-03-25 12:25:49 +01:00
Dawid Pura
1376537541 Bug 1077326 - Change mercurial-setup process by adding run test for each external extension before prompting about it. r=glandium 2014-11-25 10:53:00 +01:00
Andrew Halberstadt
8f15cac57c Bug 1101773 - Add an --update-only option to |mach mercurial-setup| for updating extensions without running the wizard, r=gps
--HG--
extra : rebase_source : 93de55544f2f907255a286b1074ed201de62a46b
2014-11-19 15:01:04 -05:00
Andrew Halberstadt
4125d6266d Bug 1092149 - Use LooseVersion instead of StrictVersion in |mach mercurial-setup| so release candidates work, r=gps 2014-10-31 15:09:39 -04:00
Rémy Ferré
484c7a4c18 Bug 1058845 - Decode raw_input() as UTF-8; r=gps
DONTBUILD (NPOTB)

--HG--
extra : amend_source : cf4f5e29de43f714ae62f247227b17e65debc710
2014-10-24 15:27:40 -07:00