forked from unicorn-wg/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1033656 - Add reviewboard to mach mercurial-setup; version checki…
…ng; 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
- Loading branch information
Showing
5 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this, | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
from __future__ import unicode_literals | ||
|
||
import os | ||
import re | ||
import subprocess | ||
|
||
from distutils.version import StrictVersion | ||
|
||
def get_hg_version(hg): | ||
"""Obtain the version of the Mercurial client.""" | ||
|
||
env = os.environ.copy() | ||
env[b'HGPLAIN'] = b'1' | ||
|
||
info = subprocess.check_output([hg, 'version'], env=env) | ||
match = re.search('version ([^\+\)]+)', info) | ||
if not match: | ||
raise Exception('Unable to identify Mercurial version.') | ||
|
||
return StrictVersion(match.group(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters