| 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 |