Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(59)

Unified Diff: codereview/engine.py

Issue 974: accept patches from mercurial SVN Base: http://rietveld.googlecode.com/svn/trunk
Patch Set: Created 3 months, 3 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: codereview/engine.py
===================================================================
--- codereview/engine.py (revision 101)
+++ codereview/engine.py (working copy)
@@ -66,6 +66,15 @@
patch = models.Patch(patchset=patchset, text=_ToText(lines),
filename=filename, parent=patchset)
patches.append(patch)
+ if not patches:
+ # let's try to convert Mercurial
+ logging.info(patchset.data)
+ lines = patchset.data.splitlines(True)
+ filename = "README"
+ if filename and lines:
+ patch = models.Patch(patchset=patchset, text=_ToText(lines),
+ filename=filename, parent=patchset)
+ patches.append(patch)
return patches
@@ -123,6 +132,7 @@
Returns:
A URL referring to the given revision of the file.
"""
+ return "http://hg.sympy.org/sympy/raw-file/tip/" + filename
scheme, netloc, path, params, query, fragment = urlparse.urlparse(base)
if netloc.endswith(".googlecode.com"):
# Handle Google code repositories

Powered by Google App Engine
This is Rietveld r305