summaryrefslogtreecommitdiff
path: root/contrib/mtn2git/mtn2git.py
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2008-01-08 03:09:11 +0000
committerHolger Freyther <zecke@selfish.org>2008-01-08 03:09:11 +0000
commit17dc0d5e796a96bd625171a326aa5a1ed5ea9ec4 (patch)
tree0234127a5c3860404bccf5029da592466e9f34c0 /contrib/mtn2git/mtn2git.py
parentb785c51d79d2fc8e11f9ebe0e7f61cae6ad57323 (diff)
contrib/mtn2git/mtn2git.py: Add modifications to the right list, check if _file_revision and file_revision of the manifest are equal
Diffstat (limited to 'contrib/mtn2git/mtn2git.py')
-rwxr-xr-xcontrib/mtn2git/mtn2git.py7
1 files 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: