Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
c3d881b3
Commit
c3d881b3
authored
Dec 11, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/codereview: suggest argument to hg mail / hg submit
R=golang-dev, iant CC=golang-dev
https://golang.org/cl/6924050
parent
111fcf15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
codereview.py
lib/codereview/codereview.py
+4
-4
No files found.
lib/codereview/codereview.py
View file @
c3d881b3
...
@@ -807,7 +807,7 @@ def EditCL(ui, repo, cl):
...
@@ -807,7 +807,7 @@ def EditCL(ui, repo, cl):
# For use by submit, etc. (NOT by change)
# For use by submit, etc. (NOT by change)
# Get change list number or list of files from command line.
# Get change list number or list of files from command line.
# If files are given, make a new change list.
# If files are given, make a new change list.
def
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
defaultcc
=
None
):
def
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
op
=
"verb"
,
defaultcc
=
None
):
if
len
(
pats
)
>
0
and
GoodCLName
(
pats
[
0
]):
if
len
(
pats
)
>
0
and
GoodCLName
(
pats
[
0
]):
if
len
(
pats
)
!=
1
:
if
len
(
pats
)
!=
1
:
return
None
,
"cannot specify change number and file names"
return
None
,
"cannot specify change number and file names"
...
@@ -821,7 +821,7 @@ def CommandLineCL(ui, repo, pats, opts, defaultcc=None):
...
@@ -821,7 +821,7 @@ def CommandLineCL(ui, repo, pats, opts, defaultcc=None):
cl
.
local
=
True
cl
.
local
=
True
cl
.
files
=
ChangedFiles
(
ui
,
repo
,
pats
,
taken
=
Taken
(
ui
,
repo
))
cl
.
files
=
ChangedFiles
(
ui
,
repo
,
pats
,
taken
=
Taken
(
ui
,
repo
))
if
not
cl
.
files
:
if
not
cl
.
files
:
return
None
,
"no files changed
"
return
None
,
"no files changed
(use hg
%
s <number> to use existing CL)"
%
op
if
opts
.
get
(
'reviewer'
):
if
opts
.
get
(
'reviewer'
):
cl
.
reviewer
=
Add
(
cl
.
reviewer
,
SplitCommaSpace
(
opts
.
get
(
'reviewer'
)))
cl
.
reviewer
=
Add
(
cl
.
reviewer
,
SplitCommaSpace
(
opts
.
get
(
'reviewer'
)))
if
opts
.
get
(
'cc'
):
if
opts
.
get
(
'cc'
):
...
@@ -1792,7 +1792,7 @@ def mail(ui, repo, *pats, **opts):
...
@@ -1792,7 +1792,7 @@ def mail(ui, repo, *pats, **opts):
if
codereview_disabled
:
if
codereview_disabled
:
raise
hg_util
.
Abort
(
codereview_disabled
)
raise
hg_util
.
Abort
(
codereview_disabled
)
cl
,
err
=
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
defaultcc
=
defaultcc
)
cl
,
err
=
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
op
=
"mail"
,
defaultcc
=
defaultcc
)
if
err
!=
""
:
if
err
!=
""
:
raise
hg_util
.
Abort
(
err
)
raise
hg_util
.
Abort
(
err
)
cl
.
Upload
(
ui
,
repo
,
gofmt_just_warn
=
True
)
cl
.
Upload
(
ui
,
repo
,
gofmt_just_warn
=
True
)
...
@@ -1881,7 +1881,7 @@ def submit(ui, repo, *pats, **opts):
...
@@ -1881,7 +1881,7 @@ def submit(ui, repo, *pats, **opts):
if
not
opts
[
"no_incoming"
]
and
hg_incoming
(
ui
,
repo
):
if
not
opts
[
"no_incoming"
]
and
hg_incoming
(
ui
,
repo
):
need_sync
()
need_sync
()
cl
,
err
=
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
defaultcc
=
defaultcc
)
cl
,
err
=
CommandLineCL
(
ui
,
repo
,
pats
,
opts
,
op
=
"submit"
,
defaultcc
=
defaultcc
)
if
err
!=
""
:
if
err
!=
""
:
raise
hg_util
.
Abort
(
err
)
raise
hg_util
.
Abort
(
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment