Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG9805c906aaad: tests: port helper script revlog-formatv0.py to python 3
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/revlog-formatv0.py (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Abandoned | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Abandoned | durin42 |
user: user | user: user | ||||
date: Thu Jan 01 00:00:00 1970 +0000 | date: Thu Jan 01 00:00:00 1970 +0000 | ||||
files: empty | files: empty | ||||
description: | description: | ||||
empty file | empty file | ||||
""" | """ | ||||
from __future__ import absolute_import | from __future__ import absolute_import | ||||
import binascii | |||||
import os | import os | ||||
import sys | import sys | ||||
files = [ | files = [ | ||||
(b'formatv0/.hg/00changelog.i', | (b'formatv0/.hg/00changelog.i', | ||||
b'000000000000004400000000000000000000000000000000000000' | b'000000000000004400000000000000000000000000000000000000' | ||||
b'000000000000000000000000000000000000000000000000000000' | b'000000000000000000000000000000000000000000000000000000' | ||||
b'0000a1ef0b125355d27765928be600cfe85784284ab3'), | b'0000a1ef0b125355d27765928be600cfe85784284ab3'), | ||||
if parent: | if parent: | ||||
makedirs(parent) | makedirs(parent) | ||||
os.mkdir(name) | os.mkdir(name) | ||||
makedirs(os.path.join(*'formatv0/.hg/data'.split('/'))) | makedirs(os.path.join(*'formatv0/.hg/data'.split('/'))) | ||||
for name, data in files: | for name, data in files: | ||||
f = open(name, 'wb') | f = open(name, 'wb') | ||||
f.write(data.decode('hex')) | f.write(binascii.unhexlify(data)) | ||||
f.close() | f.close() | ||||
sys.exit(0) | sys.exit(0) |