Mercurial > public > mercurial-scm > hg-stable
diff tests/test-revlog-ancestry.py @ 43076:2372284d9457
formatting: blacken the codebase
This is using my patch to black
(https://github.com/psf/black/pull/826) so we don't un-wrap collection
literals.
Done with:
hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S
# skip-blame mass-reformatting only
# no-check-commit reformats foo_bar functions
Differential Revision: https://phab.mercurial-scm.org/D6971
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:45:02 -0400 |
parents | b14fdf1fb615 |
children | 0e5e192adb6f |
line wrap: on
line diff
--- a/tests/test-revlog-ancestry.py Sat Oct 05 10:29:34 2019 -0400 +++ b/tests/test-revlog-ancestry.py Sun Oct 06 09:45:02 2019 -0400 @@ -11,9 +11,11 @@ repo = hg.repository(u, b'test1', create=1) os.chdir('test1') + def commit(text, time): repo.commit(text=text, date=b"%d 0" % time) + def addcommit(name, time): f = open(name, 'wb') f.write(b'%s\n' % name) @@ -21,12 +23,15 @@ repo[None].add([name]) commit(name, time) + def update(rev): merge.update(repo, rev, branchmerge=False, force=True) + def merge_(rev): merge.update(repo, rev, branchmerge=True, force=False) + if __name__ == '__main__': addcommit(b"A", 0) addcommit(b"B", 1)