Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
71102ad2
Commit
71102ad2
authored
May 12, 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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/codereview/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