Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Mullvad Browser
Commits
65f42beb
Commit
65f42beb
authored
11 years ago
by
Jonas Finnemann Jensen
Browse files
Options
Downloads
Patches
Plain Diff
Bug 910658 - Add "qnew = -U" to defaults section in mach mercurial-setup; r=gps
DONTBUILD (NPOTB)
parent
f8bc7fa7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/mercurial/hgsetup/config.py
+28
-0
28 additions, 0 deletions
tools/mercurial/hgsetup/config.py
tools/mercurial/hgsetup/wizard.py
+14
-0
14 additions, 0 deletions
tools/mercurial/hgsetup/wizard.py
with
42 additions
and
0 deletions
tools/mercurial/hgsetup/config.py
+
28
−
0
View file @
65f42beb
...
...
@@ -5,6 +5,7 @@
from
__future__
import
unicode_literals
from
configobj
import
ConfigObj
import
re
BUGZILLA_FINGERPRINT
=
'
45:77:35:fd:6f:2c:1c:c2:90:4b:f7:b4:4d:60:c6:97:c5:5c:47:27
'
...
...
@@ -115,3 +116,30 @@ class MercurialConfig(object):
del
self
.
_c
[
'
mqext
'
][
'
mqcommit
'
]
except
KeyError
:
pass
def
have_qnew_currentuser_default
(
self
):
if
'
defaults
'
not
in
self
.
_c
:
return
False
d
=
self
.
_c
[
'
defaults
'
]
if
'
qnew
'
not
in
d
:
return
False
argv
=
d
[
'
qnew
'
].
split
(
'
'
)
for
arg
in
argv
:
if
arg
==
'
--currentuser
'
or
re
.
match
(
"
-[^-]*U.*
"
,
arg
):
return
True
return
False
def
ensure_qnew_currentuser_default
(
self
):
if
self
.
have_qnew_currentuser_default
():
return
if
'
defaults
'
not
in
self
.
_c
:
self
.
_c
[
'
defaults
'
]
=
{}
d
=
self
.
_c
[
'
defaults
'
]
if
'
qnew
'
not
in
d
:
d
[
'
qnew
'
]
=
'
-U
'
else
:
d
[
'
qnew
'
]
=
'
-U
'
+
d
[
'
qnew
'
]
This diff is collapsed.
Click to expand it.
tools/mercurial/hgsetup/wizard.py
+
14
−
0
View file @
65f42beb
...
...
@@ -71,6 +71,12 @@ import patches from Bugzilla using a friendly bz:// URL handler. e.g.
|hg qimport bz://123456|.
'''
.
strip
()
QNEWCURRENTUSER_INFO
=
'''
The mercurial queues command |hg qnew|, which creates new patches in your patch
queue does not set patch author information by default. Author information
should be included when uploading for review.
'''
.
strip
()
FINISHED
=
'''
Your Mercurial should now be properly configured and recommended extensions
should be up to date!
...
...
@@ -204,6 +210,14 @@ class MercurialSetupWizard(object):
'
default
'
,
'
Ensuring qimportbz extension is up to date...
'
)
if
not
c
.
have_qnew_currentuser_default
():
print
(
QNEWCURRENTUSER_INFO
)
if
self
.
_prompt_yn
(
'
Would you like qnew to set patch author by
'
'
default
'
):
c
.
ensure_qnew_currentuser_default
()
print
(
'
Configured qnew to set patch author by default.
'
)
print
(
''
)
c
.
add_mozilla_host_fingerprints
()
b
=
StringIO
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment