@@ -25,7 +25,8 @@
> b'key': b'new-server-mark',
> b'old': b'',
> b'new': b'tip'}
- > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()]
+ > encodedparams = [(k, pushkey.encode(v))
+ > for (k, v) in params.items()]
> op.reply.newpart(b'pushkey', mandatoryparams=encodedparams)
> else:
> op.reply.newpart(b'output', data=b'pushback not enabled')
@@ -11,11 +11,11 @@
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert = " >> $HGRCPATH
$ cat > cvshooks.py <<EOF
- > def cvslog(ui,repo,hooktype,log):
- > ui.write(b'%s hook: %d entries\n' % (hooktype,len(log)))
+ > def cvslog(ui, repo, hooktype, log):
+ > ui.write(b'%s hook: %d entries\n' % (hooktype, len(log)))
>
- > def cvschangesets(ui,repo,hooktype,changesets):
- > ui.write(b'%s hook: %d changesets\n' % (hooktype,len(changesets)))
+ > def cvschangesets(ui, repo, hooktype, changesets):
+ > ui.write(b'%s hook: %d changesets\n' % (hooktype, len(changesets)))
> EOF
$ hookpath=`pwd`
$ cat <<EOF >> $HGRCPATH
@@ -640,7 +640,7 @@ import-checker.py or so on their content
Make sure a broken uisetup doesn't globally break hg:
$ cat > $TESTTMP/baduisetup.py <<EOF
> def uisetup(ui):
- > 1/0
+ > 1 / 0
> EOF
Even though the extension fails during uisetup, hg is still basically usable:
@@ -649,7 +649,7 @@ Even though the extension fails during u
File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
uisetup(ui)
File "$TESTTMP/baduisetup.py", line 2, in uisetup
- 1/0
+ 1 / 0
ZeroDivisionError: * by zero (glob)
*** failed to set up extension baduisetup: * by zero (glob)
Mercurial Distributed SCM (version *) (glob)
@@ -62,12 +62,12 @@ should be used from d74fc8dec2b4 onward
> output = stringio()
> env['PATH_INFO'] = '/'
> env['QUERY_STRING'] = 'style=atom'
- > process(hgweb.hgweb(b'.', name = b'repo'))
+ > process(hgweb.hgweb(b'.', name=b'repo'))
>
> output = stringio()
> env['PATH_INFO'] = '/file/tip/'
> env['QUERY_STRING'] = 'style=raw'
- > process(hgweb.hgweb(b'.', name = b'repo'))
+ > process(hgweb.hgweb(b'.', name=b'repo'))
>
> output = stringio()
> env['PATH_INFO'] = '/'
@@ -12,9 +12,9 @@ Test applying context diffs
> count = int(pattern[0:-1])
> char = pattern[-1].encode('utf8') + b'\n'
> if not lasteol and i == len(patterns) - 1:
- > fp.write((char*count)[:-1])
+ > fp.write((char * count)[:-1])
> else:
- > fp.write(char*count)
+ > fp.write(char * count)
> fp.close()
> EOF
$ cat > cat.py <<EOF
@@ -9,7 +9,7 @@ Test how largefiles abort in case the di
> #
> # this makes the original largefiles code abort:
> _origcopyfileobj = shutil.copyfileobj
- > def copyfileobj(fsrc, fdst, length=16*1024):
+ > def copyfileobj(fsrc, fdst, length=16 * 1024):
> # allow journal files (used by transaction) to be written
> if b'journal.' in fdst.name:
> return _origcopyfileobj(fsrc, fdst, length)
@@ -15,10 +15,10 @@ future qrefresh.
>
> f = open(path, 'wb')
> for i in range(len(args) // 2):
- > count, s = args[2*i:2*i+2]
+ > count, s = args[2 * i:2 * i + 2]
> count = int(count)
> s = encode(s)
- > f.write(s*count)
+ > f.write(s * count)
> f.close()
> EOF
@@ -9,11 +9,11 @@
> assert (len(args) % 2) == 0
>
> f = open(path, 'wb')
- > for i in range(len(args)//2):
- > count, s = args[2*i:2*i+2]
+ > for i in range(len(args) // 2):
+ > count, s = args[2 * i:2 * i + 2]
> count = int(count)
> s = encode(s)
- > f.write(s*count)
+ > f.write(s * count)
> f.close()
>
> EOF
@@ -9,7 +9,7 @@
> for pattern in patterns:
> count = int(pattern[0:-1])
> char = pattern[-1].encode('utf8') + b'\n'
- > fp.write(char*count)
+ > fp.write(char * count)
> fp.close()
> EOF
@@ -52,7 +52,7 @@ delete an untracked file
$ "$PYTHON" <<EOF
> import os
> import stat
- > f= 'untracked_file_readonly'
+ > f = 'untracked_file_readonly'
> os.chmod(f, stat.S_IMODE(os.stat(f).st_mode) & ~stat.S_IWRITE)
> EOF
$ hg purge -p
@@ -12,9 +12,9 @@
> """
> if 3 not in subset:
> if 2 in subset:
- > return baseset([2,2])
+ > return baseset([2, 2])
> return baseset()
- > return baseset([3,3,2,2])
+ > return baseset([3, 3, 2, 2])
>
> mercurial.revset.symbols[b'r3232'] = r3232
> EOF