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