Mercurial > hg
comparison tests/test-commit-multiple.t @ 33721:24849d53697d
tests: clean up many print statements to be print functions instead
Differential Revision: https://phab.mercurial-scm.org/D294
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 15 Jun 2017 14:22:25 -0400 |
parents | d83ca854fa21 |
children | e2c0c0884b1f |
comparison
equal
deleted
inserted
replaced
33720:27fb986e54d0 | 33721:24849d53697d |
---|---|
88 > f.seek(0, 0) | 88 > f.seek(0, 0) |
89 > f.write(b) | 89 > f.write(b) |
90 > f.close() | 90 > f.close() |
91 > | 91 > |
92 > def printfiles(repo, rev): | 92 > def printfiles(repo, rev): |
93 > print "revision %s files: %s" % (rev, repo[rev].files()) | 93 > print("revision %s files: %s" % (rev, repo[rev].files())) |
94 > | 94 > |
95 > repo = hg.repository(ui.ui.load(), '.') | 95 > repo = hg.repository(ui.ui.load(), '.') |
96 > assert len(repo) == 6, \ | 96 > assert len(repo) == 6, \ |
97 > "initial: len(repo): %d, expected: 6" % len(repo) | 97 > "initial: len(repo): %d, expected: 6" % len(repo) |
98 > | 98 > |
99 > replacebyte("bugfix", "u") | 99 > replacebyte("bugfix", "u") |
100 > sleep(2) | 100 > sleep(2) |
101 > try: | 101 > try: |
102 > print "PRE: len(repo): %d" % len(repo) | 102 > print("PRE: len(repo): %d" % len(repo)) |
103 > wlock = repo.wlock() | 103 > wlock = repo.wlock() |
104 > lock = repo.lock() | 104 > lock = repo.lock() |
105 > replacebyte("file1", "x") | 105 > replacebyte("file1", "x") |
106 > repo.commit(text="x", user="test", date=(0, 0)) | 106 > repo.commit(text="x", user="test", date=(0, 0)) |
107 > replacebyte("file1", "y") | 107 > replacebyte("file1", "y") |
108 > repo.commit(text="y", user="test", date=(0, 0)) | 108 > repo.commit(text="y", user="test", date=(0, 0)) |
109 > print "POST: len(repo): %d" % len(repo) | 109 > print("POST: len(repo): %d" % len(repo)) |
110 > finally: | 110 > finally: |
111 > lock.release() | 111 > lock.release() |
112 > wlock.release() | 112 > wlock.release() |
113 > printfiles(repo, 6) | 113 > printfiles(repo, 6) |
114 > printfiles(repo, 7) | 114 > printfiles(repo, 7) |