Commit Graph

61 Commits

Author SHA1 Message Date
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
Alexis Metaireau
5e0f71dec1 Bug 1071133 — Make sure mercurial-setup knows how to handle unicode characters. r=gps 2014-09-22 20:03:17 +02:00
Felix Baylac-Jacque
c54d74da9e Bug 1049893 - Allow mach mercurial-setup to work if no ~/.hgrc exists; r=gps
DONTBUILD (NPOTB)

--HG--
extra : rebase_source : 8788d55cd5cfa5e64627d7951209c5f2c1222f0a
2014-08-07 00:19:06 +02:00
Patrick Cloke
ecc2933e4b Bug 1047592 - mercurial-setup should error when trying to read a config with %include. r=gps 2014-08-05 09:42:33 -04:00
Gregory Szorc
5349fe30df Bug 1039894 - Add bzpost and firefoxtree to mach mercurial-setup; r=smacleod
bzpost is an efficiency win for everyone.

firefox tree is mostly useful for people doing head/bookmark-based
development.

Both extensions can yield massive productivity wins. They should be
advertised.

DONTBUILD (NPOTB) on a CLOSED TREE

--HG--
extra : rebase_source : ab72d3afd6ab244bfdbdb2dda5e0b45c9d8f782e
extra : amend_source : 91ec7523a4631c7519efd3b6cd425cff00bd0569
2014-07-16 19:18:49 -07:00
Chris Kitching
665b00fc20 Bug 1039164: Prettier handling of invalid hgrc files by mach. r=gps 2014-07-17 01:21:06 +01:00
Gregory Szorc
41b24b278a Bug 1033656 - Add reviewboard to mach mercurial-setup; version checking; r=smacleod
We want to make it turnkey for people to use reviewboard. So, we add
reviewboard and related functionality to |mach mercurial-setup|.

Since the reviewboard extension only works in Mercurial 3.0 and newer,
we add some version detection for the Mercurial version. This should
have been done months ago. We now have it.

I also took the opportunity to inform |mach bootstrap| that Mercurial
2.x is no longer modern.

I also updated the messaging around mq to encourage fewer new users to
use it. You may find this controversial. People can always ignore the
message.

Finally, I also added a histedit prompt to the mix, since a lot of
people don't know about that and many find it useful.

I could have broken this into multiple patches. Meh.

--HG--
extra : rebase_source : d33f8abcabb6ad6511c2f9e202283d43613fafc4
extra : amend_source : 3a56bc4d49ee6200cbdd0e87b4f28489518fee79
2014-07-02 14:05:42 -07:00
Gregory Szorc
b3c8b25895 Bug 994359 - Update Bitbucket certificate fingerprint; r=edmorley
Certificate updated per
http://blog.bitbucket.org/2014/04/08/bitbuckets-ssl-certificates-are-changing/

DONTBUILD (NPOTB)

--HG--
extra : rebase_source : 7b2acdad8221d40629a0fff7b9b9fcfbd51eb1a5
extra : amend_source : 2138af8ab774420f466e33914f2abdb82a52df25
2014-04-09 15:33:16 -07:00
Gregory Szorc
3049613acd Bug 981724 - Update fingerprint for bitbucket; r=edmorley
DONTBUILD (NPOTB)

--HG--
extra : rebase_source : b69aeae32da1099a9ee195847d8daf02d38d4f7d
extra : amend_source : 294da8b00aeafb061c336be0b3c2b291ff3bf933
2014-03-10 10:35:40 -07:00
Ed Morley
b5bed65e1b Bug 977961 - mach mercurial-setup: Avoid prompting to enable mqext auto-commit when already enabled; r=gps
DONTBUILD (NPOTB)
2014-02-28 16:43:01 +00:00
Ed Morley
062a8a4787 Bug 977414 - mach mercurial-setup: Fix hgrc paths for extensions on Windows; r=gps 2014-02-27 10:10:22 +00:00
Ed Morley
7c6e79c623 Bug 977384 - mach mercurial-setup: Remaining cleanup; r=gps 2014-02-27 10:10:22 +00:00
Ed Morley
4846f44798 Bug 977384 - mach mercurial-setup: Refactor part 2; r=gps 2014-02-27 10:10:21 +00:00
Ed Morley
28eb02568c Bug 977384 - mach mercurial-setup: Refactor part 1; r=gps 2014-02-27 10:10:20 +00:00
Ed Morley
d2c87d8647 Bug 976892 - Update mach mercurial-setup to use qimportbz from it's new home in version-control-tools; r=gps
qimportbz is now pulled from its new canonical home. The old location can
be cleaned if the user agrees to it. The new location is updated in the
hgrc.

DONTBUILD (NPOTB)
2014-02-26 17:28:09 +00:00