equal
deleted
inserted
replaced
19 hg -R b ci -m bar |
19 hg -R b ci -m bar |
20 hg --encoding utf-8 -R b push | sed "s/$HGPORT1/PORT/" |
20 hg --encoding utf-8 -R b push | sed "s/$HGPORT1/PORT/" |
21 hg -R a --encoding utf-8 log |
21 hg -R a --encoding utf-8 log |
22 |
22 |
23 kill `cat hg.pid` |
23 kill `cat hg.pid` |
|
24 |
|
25 |
|
26 # verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x) |
|
27 |
|
28 cat <<EOF > oldhg |
|
29 import sys |
|
30 from mercurial import ui, hg, commands |
|
31 |
|
32 class StdoutWrapper(object): |
|
33 def __init__(self, stdout): |
|
34 self._file = stdout |
|
35 |
|
36 def write(self, data): |
|
37 if data == '47\n': |
|
38 # latin1 encoding is one %xx (3 bytes) shorter |
|
39 data = '44\n' |
|
40 elif data.startswith('%C3%A6 '): |
|
41 # translate to latin1 encoding |
|
42 data = '%%E6 %s' % data[7:] |
|
43 self._file.write(data) |
|
44 |
|
45 def __getattr__(self, name): |
|
46 return getattr(self._file, name) |
|
47 |
|
48 sys.stdout = StdoutWrapper(sys.stdout) |
|
49 sys.stderr = StdoutWrapper(sys.stderr) |
|
50 |
|
51 myui = ui.ui() |
|
52 repo = hg.repository(myui, 'a') |
|
53 commands.serve(myui, repo, stdio=True) |
|
54 EOF |
|
55 |
|
56 echo baz >> b/foo |
|
57 hg -R b ci -m baz |
|
58 hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1 |