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
c1fcdb0e
Commit
c1fcdb0e
authored
Aug 06, 2014
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codereview: handle upload of merge
LGTM=minux R=minux CC=golang-codereviews
https://golang.org/cl/118690043
parent
6ff5c317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
codereview.py
lib/codereview/codereview.py
+15
-3
No files found.
lib/codereview/codereview.py
View file @
c1fcdb0e
...
...
@@ -3478,11 +3478,23 @@ class MercurialVCS(VersionControlSystem):
if
not
err
and
mqparent
!=
""
:
self
.
base_rev
=
mqparent
else
:
out
=
RunShell
([
"hg"
,
"parents"
,
"-q"
],
silent_ok
=
True
)
.
strip
()
out
=
RunShell
([
"hg"
,
"parents"
,
"-q"
,
"--template={node} {branch}"
],
silent_ok
=
True
)
.
strip
()
if
not
out
:
# No revisions; use 0 to mean a repository with nothing.
out
=
"0:0"
self
.
base_rev
=
out
.
split
(
':'
)[
1
]
.
strip
()
out
=
"0:0 default"
# Find parent along current branch.
branch
=
repo
[
None
]
.
branch
()
base
=
""
for
line
in
out
.
splitlines
():
fields
=
line
.
strip
()
.
split
(
' '
)
if
fields
[
1
]
==
branch
:
base
=
fields
[
0
]
break
if
base
==
""
:
# Use the first parent
base
=
out
.
strip
()
.
split
(
' '
)[
0
]
self
.
base_rev
=
base
def
_GetRelPath
(
self
,
filename
):
"""Get relative path of a file according to the current directory,
...
...
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