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
c614ffe9
Commit
c614ffe9
authored
Nov 20, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codereview: make hg sync work with Mercurial 1.4
R=r
https://golang.org/cl/157102
parent
c62069cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
codereview.py
lib/codereview/codereview.py
+21
-10
No files found.
lib/codereview/codereview.py
View file @
c614ffe9
...
...
@@ -1101,15 +1101,7 @@ def sync_changes(ui, repo):
# Look through recent change log descriptions to find
# potential references to http://.*/our-CL-number.
# Double-check them by looking at the Rietveld log.
get
=
util
.
cachefunc
(
lambda
r
:
repo
[
r
]
.
changeset
())
changeiter
,
matchfn
=
cmdutil
.
walkchangerevs
(
ui
,
repo
,
[],
get
,
{
'rev'
:
None
})
n
=
0
for
st
,
rev
,
fns
in
changeiter
:
if
st
!=
'iter'
:
continue
n
+=
1
if
n
>
100
:
break
def
Rev
(
rev
):
desc
=
repo
[
rev
]
.
description
()
.
strip
()
for
clname
in
re
.
findall
(
'(?m)^http://(?:[^
\n
]+)/([0-9]+)$'
,
desc
):
if
IsLocalCL
(
ui
,
repo
,
clname
)
and
IsRietveldSubmitted
(
ui
,
clname
,
repo
[
rev
]
.
hex
()):
...
...
@@ -1118,9 +1110,28 @@ def sync_changes(ui, repo):
if
err
!=
""
:
ui
.
warn
(
"loading CL
%
s:
%
s
\n
"
%
(
clname
,
err
))
continue
EditDesc
(
cl
.
name
,
closed
=
"checked"
)
if
not
cl
.
original_author
:
EditDesc
(
cl
.
name
,
closed
=
"checked"
)
cl
.
Delete
(
ui
,
repo
)
if
hgversion
<
'1.4'
:
get
=
util
.
cachefunc
(
lambda
r
:
repo
[
r
]
.
changeset
())
changeiter
,
matchfn
=
cmdutil
.
walkchangerevs
(
ui
,
repo
,
[],
get
,
{
'rev'
:
None
})
n
=
0
for
st
,
rev
,
fns
in
changeiter
:
if
st
!=
'iter'
:
continue
n
+=
1
if
n
>
100
:
break
Rev
(
rev
)
else
:
matchfn
=
cmdutil
.
match
(
repo
,
[],
{
'rev'
:
None
})
def
prep
(
ctx
,
fns
):
pass
for
ctx
in
cmdutil
.
walkchangerevs
(
repo
,
matchfn
,
{
'rev'
:
None
},
prep
):
Rev
(
ctx
.
rev
())
# Remove files that are not modified from the CLs in which they appear.
all
=
LoadAllCL
(
ui
,
repo
,
web
=
False
)
changed
=
ChangedFiles
(
ui
,
repo
,
[],
{})
...
...
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