From 17dc0d5e796a96bd625171a326aa5a1ed5ea9ec4 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Tue, 8 Jan 2008 03:09:11 +0000 Subject: contrib/mtn2git/mtn2git.py: Add modifications to the right list, check if _file_revision and file_revision of the manifest are equal --- contrib/mtn2git/mtn2git.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py index f6f488ccc5..346fe28d98 100755 --- a/contrib/mtn2git/mtn2git.py +++ b/contrib/mtn2git/mtn2git.py @@ -204,10 +204,10 @@ def fast_import(ops, revision): # will simply add it to the modified list and ask to retrieve the status from the manifest for (file, attribute, value, rev) in revision["set_attributes"]: if attribute == "mtn:execute": - revision["modified"].append((file, None, rev)) + all_modifications.add( (file, None, rev) ) for (file, attribute, rev) in revision["clear_attributes"]: if attribute == "mtn:execute": - revision["modified"].append((file, None, rev)) + all_modifications.add( (file, None, rev) ) @@ -260,6 +260,9 @@ def get_file_and_mode(operations, file_tree, file_name, _file_revision, rev = No assert file_name in file_tree.files, "get_file_and_mode: Revision '%s', file_name='%s' " % (rev, file_name) (file_revision, executable) = file_tree.files[file_name] + if _file_revision: + assert _file_revision == file_revision, "Same filerevision for file_name='%s' in rev='%s' (%s,%s)" % (file_name, rev, file_revision, _file_revision) + if executable: mode = 755 else: -- cgit v1.2.3