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
71102ad2
Commit
71102ad2
authored
May 13, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codereview: fix clpatch
TBR=gri CC=golang-dev
https://golang.org/cl/4534052
parent
14c59abd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
codereview.py
lib/codereview/codereview.py
+6
-3
No files found.
lib/codereview/codereview.py
View file @
71102ad2
...
...
@@ -1336,8 +1336,6 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
return
err
if
patch
==
emptydiff
:
return
"codereview issue
%
s has no diff"
%
clname
if
not
repo
[
vers
]:
return
"codereview issue
%
s is newer than the current repository; hg sync"
%
clname
# find current hg version (hg identify)
ctx
=
repo
[
None
]
...
...
@@ -1347,7 +1345,12 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
# if version does not match the patch version,
# try to update the patch line numbers.
if
vers
!=
""
and
id
!=
vers
:
if
vers
not
in
repo
:
# "vers in repo" gives the wrong answer
# on some versions of Mercurial. Instead, do the actual
# lookup and catch the exception.
try
:
repo
[
vers
]
.
description
()
except
:
return
"local repository is out of date; sync to get
%
s"
%
(
vers
)
patch
,
err
=
portPatch
(
repo
,
patch
,
vers
,
id
)
if
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