Show More
@@ -7,6 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
|
10 | import array | |||
10 | import difflib |
|
11 | import difflib | |
11 | import re |
|
12 | import re | |
12 | import struct |
|
13 | import struct | |
@@ -50,9 +51,15 b' def _normalizeblocks(a, b, blocks):' | |||||
50 | r.append(prev) |
|
51 | r.append(prev) | |
51 | return r |
|
52 | return r | |
52 |
|
53 | |||
|
54 | def _tostring(c): | |||
|
55 | if type(c) is array.array: | |||
|
56 | # this copy overhead isn't ideal | |||
|
57 | return c.tostring() | |||
|
58 | return str(c) | |||
|
59 | ||||
53 | def bdiff(a, b): |
|
60 | def bdiff(a, b): | |
54 | a = str(a).splitlines(True) |
|
61 | a = _tostring(a).splitlines(True) | |
55 | b = str(b).splitlines(True) |
|
62 | b = _tostring(b).splitlines(True) | |
56 |
|
63 | |||
57 | if not a: |
|
64 | if not a: | |
58 | s = "".join(b) |
|
65 | s = "".join(b) |
@@ -1,5 +1,8 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
|
3 | Initialize repository | |||
|
4 | the status call is to check for issue5130 | |||
|
5 | ||||
3 |
$ |
|
6 | $ hg init server | |
4 | $ cd server |
|
7 | $ cd server | |
5 | $ touch foo |
|
8 | $ touch foo | |
@@ -8,6 +11,7 b'' | |||||
8 | ... with open(str(i), 'wb') as fh: |
|
11 | ... with open(str(i), 'wb') as fh: | |
9 | ... fh.write(str(i)) |
|
12 | ... fh.write(str(i)) | |
10 | $ hg -q commit -A -m 'add a lot of files' |
|
13 | $ hg -q commit -A -m 'add a lot of files' | |
|
14 | $ hg st | |||
11 |
$ |
|
15 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
12 | $ cat hg.pid >> $DAEMON_PIDS |
|
16 | $ cat hg.pid >> $DAEMON_PIDS | |
13 | $ cd .. |
|
17 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now