Show More
@@ -11,6 +11,7 b' from i18n import _' | |||
|
11 | 11 | import repo, changegroup, statichttprepo, error, url, util |
|
12 | 12 | import os, urllib, urllib2, urlparse, zlib, httplib |
|
13 | 13 | import errno, socket |
|
14 | import encoding | |
|
14 | 15 | |
|
15 | 16 | def zgenerator(f): |
|
16 | 17 | zd = zlib.decompressobj() |
@@ -153,6 +154,10 b' class httprepository(repo.repository):' | |||
|
153 | 154 | for branchpart in d.splitlines(): |
|
154 | 155 | branchheads = branchpart.split(' ') |
|
155 | 156 | branchname = urllib.unquote(branchheads[0]) |
|
157 | try: | |
|
158 | branchname.decode('utf-8', 'strict') | |
|
159 | except UnicodeDecodeError: | |
|
160 | branchname = encoding.tolocal(branchname) | |
|
156 | 161 | branchheads = [bin(x) for x in branchheads[1:]] |
|
157 | 162 | branchmap[branchname] = branchheads |
|
158 | 163 | return branchmap |
@@ -7,7 +7,7 b'' | |||
|
7 | 7 | |
|
8 | 8 | from node import bin, hex |
|
9 | 9 | from i18n import _ |
|
10 | import repo, util, error | |
|
10 | import repo, util, error, encoding | |
|
11 | 11 | import re, urllib |
|
12 | 12 | |
|
13 | 13 | class remotelock(object): |
@@ -173,6 +173,10 b' class sshrepository(repo.repository):' | |||
|
173 | 173 | for branchpart in d.splitlines(): |
|
174 | 174 | branchheads = branchpart.split(' ') |
|
175 | 175 | branchname = urllib.unquote(branchheads[0]) |
|
176 | try: | |
|
177 | branchname.decode('utf-8', 'strict') | |
|
178 | except UnicodeDecodeError: | |
|
179 | branchname = encoding.tolocal(branchname) | |
|
176 | 180 | branchheads = [bin(x) for x in branchheads[1:]] |
|
177 | 181 | branchmap[branchname] = branchheads |
|
178 | 182 | return branchmap |
General Comments 0
You need to be logged in to leave comments.
Login now