Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 34131:0fa781320203
doctest: bulk-replace string literals with b'' for Python 3
Our code transformer can't rewrite string literals in docstrings, and I
don't want to make the transformer more complex.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 14:32:11 +0900 |
parents | 6294654453ee |
children | 23ed47a895d5 |
comparison
equal
deleted
inserted
replaced
34130:ada8a19672ab | 34131:0fa781320203 |
---|---|
178 return _peerorrepo(rui, path, create).peer() | 178 return _peerorrepo(rui, path, create).peer() |
179 | 179 |
180 def defaultdest(source): | 180 def defaultdest(source): |
181 '''return default destination of clone if none is given | 181 '''return default destination of clone if none is given |
182 | 182 |
183 >>> defaultdest('foo') | 183 >>> defaultdest(b'foo') |
184 'foo' | 184 'foo' |
185 >>> defaultdest('/foo/bar') | 185 >>> defaultdest(b'/foo/bar') |
186 'bar' | 186 'bar' |
187 >>> defaultdest('/') | 187 >>> defaultdest(b'/') |
188 '' | 188 '' |
189 >>> defaultdest('') | 189 >>> defaultdest(b'') |
190 '' | 190 '' |
191 >>> defaultdest('http://example.org/') | 191 >>> defaultdest(b'http://example.org/') |
192 '' | 192 '' |
193 >>> defaultdest('http://example.org/foo/') | 193 >>> defaultdest(b'http://example.org/foo/') |
194 'foo' | 194 'foo' |
195 ''' | 195 ''' |
196 path = util.url(source).path | 196 path = util.url(source).path |
197 if not path: | 197 if not path: |
198 return '' | 198 return '' |