Ian Cordasco avatar Ian Cordasco committed 5742399

Update this to deal with Marc and Bruno's names

Strings are hard, let's introduce hacks.

Comments (0)

Files changed (1)

bin/git-patch-to-hg-export.py

     # NOTE: there will still be an index line after each diff --git, but it
     # will be ignored
     for line in fin:
-        fout.write(line)
+        fout.write(line.encode('utf-8'))
 
     # NOTE: the --/version will still be at the end, but it will be ignored
 
             import requests
             import io
             resp = requests.get(sys.argv[1])
-            return io.StringIO(resp.content) if resp.ok else io.StringIO('')
+            if resp.ok:
+                return io.StringIO(resp.content.decode('utf-8'))
+            else:
+                return io.StringIO('')
         elif os.path.exists(sys.argv[1]):
             return open(sys.argv[1])
     return sys.stdin
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.