##// END OF EJS Templates
tests: bulk changes to avoid whitespace errors of check-code.py...
FUJIWARA Katsunori -
r41885:c70bdd22 default
parent child Browse files
Show More
@@ -25,7 +25,8 b''
25 25 > b'key': b'new-server-mark',
26 26 > b'old': b'',
27 27 > b'new': b'tip'}
28 > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()]
28 > encodedparams = [(k, pushkey.encode(v))
29 > for (k, v) in params.items()]
29 30 > op.reply.newpart(b'pushkey', mandatoryparams=encodedparams)
30 31 > else:
31 32 > op.reply.newpart(b'output', data=b'pushback not enabled')
@@ -11,11 +11,11 b''
11 11 $ echo "[extensions]" >> $HGRCPATH
12 12 $ echo "convert = " >> $HGRCPATH
13 13 $ cat > cvshooks.py <<EOF
14 > def cvslog(ui,repo,hooktype,log):
15 > ui.write(b'%s hook: %d entries\n' % (hooktype,len(log)))
14 > def cvslog(ui, repo, hooktype, log):
15 > ui.write(b'%s hook: %d entries\n' % (hooktype, len(log)))
16 16 >
17 > def cvschangesets(ui,repo,hooktype,changesets):
18 > ui.write(b'%s hook: %d changesets\n' % (hooktype,len(changesets)))
17 > def cvschangesets(ui, repo, hooktype, changesets):
18 > ui.write(b'%s hook: %d changesets\n' % (hooktype, len(changesets)))
19 19 > EOF
20 20 $ hookpath=`pwd`
21 21 $ cat <<EOF >> $HGRCPATH
@@ -640,7 +640,7 b' import-checker.py or so on their content'
640 640 Make sure a broken uisetup doesn't globally break hg:
641 641 $ cat > $TESTTMP/baduisetup.py <<EOF
642 642 > def uisetup(ui):
643 > 1/0
643 > 1 / 0
644 644 > EOF
645 645
646 646 Even though the extension fails during uisetup, hg is still basically usable:
@@ -649,7 +649,7 b' Even though the extension fails during u'
649 649 File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
650 650 uisetup(ui)
651 651 File "$TESTTMP/baduisetup.py", line 2, in uisetup
652 1/0
652 1 / 0
653 653 ZeroDivisionError: * by zero (glob)
654 654 *** failed to set up extension baduisetup: * by zero (glob)
655 655 Mercurial Distributed SCM (version *) (glob)
@@ -62,12 +62,12 b' should be used from d74fc8dec2b4 onward '
62 62 > output = stringio()
63 63 > env['PATH_INFO'] = '/'
64 64 > env['QUERY_STRING'] = 'style=atom'
65 > process(hgweb.hgweb(b'.', name = b'repo'))
65 > process(hgweb.hgweb(b'.', name=b'repo'))
66 66 >
67 67 > output = stringio()
68 68 > env['PATH_INFO'] = '/file/tip/'
69 69 > env['QUERY_STRING'] = 'style=raw'
70 > process(hgweb.hgweb(b'.', name = b'repo'))
70 > process(hgweb.hgweb(b'.', name=b'repo'))
71 71 >
72 72 > output = stringio()
73 73 > env['PATH_INFO'] = '/'
@@ -12,9 +12,9 b' Test applying context diffs'
12 12 > count = int(pattern[0:-1])
13 13 > char = pattern[-1].encode('utf8') + b'\n'
14 14 > if not lasteol and i == len(patterns) - 1:
15 > fp.write((char*count)[:-1])
15 > fp.write((char * count)[:-1])
16 16 > else:
17 > fp.write(char*count)
17 > fp.write(char * count)
18 18 > fp.close()
19 19 > EOF
20 20 $ cat > cat.py <<EOF
@@ -9,7 +9,7 b' Test how largefiles abort in case the di'
9 9 > #
10 10 > # this makes the original largefiles code abort:
11 11 > _origcopyfileobj = shutil.copyfileobj
12 > def copyfileobj(fsrc, fdst, length=16*1024):
12 > def copyfileobj(fsrc, fdst, length=16 * 1024):
13 13 > # allow journal files (used by transaction) to be written
14 14 > if b'journal.' in fdst.name:
15 15 > return _origcopyfileobj(fsrc, fdst, length)
@@ -15,10 +15,10 b' future qrefresh.'
15 15 >
16 16 > f = open(path, 'wb')
17 17 > for i in range(len(args) // 2):
18 > count, s = args[2*i:2*i+2]
18 > count, s = args[2 * i:2 * i + 2]
19 19 > count = int(count)
20 20 > s = encode(s)
21 > f.write(s*count)
21 > f.write(s * count)
22 22 > f.close()
23 23 > EOF
24 24
@@ -9,11 +9,11 b''
9 9 > assert (len(args) % 2) == 0
10 10 >
11 11 > f = open(path, 'wb')
12 > for i in range(len(args)//2):
13 > count, s = args[2*i:2*i+2]
12 > for i in range(len(args) // 2):
13 > count, s = args[2 * i:2 * i + 2]
14 14 > count = int(count)
15 15 > s = encode(s)
16 > f.write(s*count)
16 > f.write(s * count)
17 17 > f.close()
18 18 >
19 19 > EOF
@@ -9,7 +9,7 b''
9 9 > for pattern in patterns:
10 10 > count = int(pattern[0:-1])
11 11 > char = pattern[-1].encode('utf8') + b'\n'
12 > fp.write(char*count)
12 > fp.write(char * count)
13 13 > fp.close()
14 14 > EOF
15 15
@@ -52,7 +52,7 b' delete an untracked file'
52 52 $ "$PYTHON" <<EOF
53 53 > import os
54 54 > import stat
55 > f= 'untracked_file_readonly'
55 > f = 'untracked_file_readonly'
56 56 > os.chmod(f, stat.S_IMODE(os.stat(f).st_mode) & ~stat.S_IWRITE)
57 57 > EOF
58 58 $ hg purge -p
@@ -12,9 +12,9 b''
12 12 > """
13 13 > if 3 not in subset:
14 14 > if 2 in subset:
15 > return baseset([2,2])
15 > return baseset([2, 2])
16 16 > return baseset()
17 > return baseset([3,3,2,2])
17 > return baseset([3, 3, 2, 2])
18 18 >
19 19 > mercurial.revset.symbols[b'r3232'] = r3232
20 20 > EOF
General Comments 0
You need to be logged in to leave comments. Login now