diff options
author | Brian Harring <ferringb@google.com> | 2012-10-16 17:26:35 -0700 |
---|---|---|
committer | Brian Harring <ferringb@google.com> | 2012-10-16 17:58:10 -0700 |
commit | 55014961205c9486d9838852af4e4f016950b8c1 (patch) | |
tree | dfb8dbb2557afbf2ab0683d66ba2f70ee1380c1a | |
parent | parallelize things further; add thin manifest converter in addition (no huge ... (diff) | |
download | git-conversion-tools-55014961205c9486d9838852af4e4f016950b8c1.tar.gz git-conversion-tools-55014961205c9486d9838852af4e4f016950b8c1.tar.bz2 git-conversion-tools-55014961205c9486d9838852af4e4f016950b8c1.zip |
minor output tweaks
-rwxr-xr-x | create-git.sh | 2 | ||||
-rwxr-xr-x | process_directory.sh | 2 | ||||
-rwxr-xr-x | rewrite-commit-dump.py | 11 |
3 files changed, 7 insertions, 8 deletions
diff --git a/create-git.sh b/create-git.sh index dab679e..97448ff 100755 --- a/create-git.sh +++ b/create-git.sh @@ -48,7 +48,7 @@ time { ( cd "${root}"; ./rewrite-commit-dump.py; ) | \ ( read line; { echo "$line"; cat; } | \ tee ../export-stream-rewritten |\ - time git fast-import + git fast-import ) } 2>&1 > >(tee git-creation.log) ret=$? diff --git a/process_directory.sh b/process_directory.sh index cb1041b..9684f1e 100755 --- a/process_directory.sh +++ b/process_directory.sh @@ -13,7 +13,7 @@ f() { # Note- this must be canonical path, else it screws up our $Header rewriting. cd "$(readlink -f "${output}" )" export PYTHONPATH="${output}${PYTHONPATH:+:${PYTHONPATH}}" - time cvs2git --options config -vv + time cvs2git --options config -v cd git git init --bare # Note we're only pull in blob data here; this intentional- we need to diff --git a/rewrite-commit-dump.py b/rewrite-commit-dump.py index 607c7a5..3744fb3 100755 --- a/rewrite-commit-dump.py +++ b/rewrite-commit-dump.py @@ -201,7 +201,7 @@ def serialize_records(records, handle, target='refs/heads/master', progress=100) for idx, record in enumerate(records, 1): if idx % progress_interval == 0: write('progress %s%%: %s of %i commits\n' - % (str((100 * float(idx))/total).rjust(2), str(idx).rjust(total_len), total)) + % (str(int(100 * (float(idx)/total))).rjust(2), str(idx).rjust(total_len), total)) write('commit %s\n' % target) write('mark :%i\n' % idx) # fields = ('mark', 'author', 'committer', 'msg', 'files') @@ -295,7 +295,7 @@ import traceback def process_record(data): try: return _process_record(data) - except Exception, e: + except Exception: return traceback.format_exc() def _process_record(data): @@ -343,10 +343,8 @@ def thin_manifest_conversion(records, processing_pool): potentials.append((idx, manifests, record)) rewrites = deletes = 0 - processed = 0 for result in processing_pool.imap_unordered( process_record, potentials, chunksize=30): - processed += 1 if result is not None: if not isinstance(result, tuple): raise Exception(result) @@ -369,8 +367,9 @@ def process_directory(paths): deserialize_records(data, deserialize_blob_map(idx_path)))) def main(argv): - # allocate the pool now, before we start getting memory abusive - clean_pool = multiprocessing.Pool() + # allocate the pool now, before we start getting memory abusive; this is + # used for thin-manifest conversion if active/enabled. + #clean_pool = multiprocessing.Pool() # Be careful here to just iterate over source; doing so allows this script # to do basic processing as it goes (specifically while it's being fed from |