Merge lp:~abentley/wikkid/branch-file-store into lp:wikkid

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 68
Proposed branch: lp:~abentley/wikkid/branch-file-store
Merge into: lp:wikkid
Diff against target: 36 lines (+5/-4)
1 file modified
wikkid/filestore/bzr.py (+5/-4)
To merge this branch: bzr merge lp:~abentley/wikkid/branch-file-store
Reviewer Review Type Date Requested Status
Wikkid Hackers Pending
Review via email: mp+66503@code.launchpad.net

Commit message

Fix file-id creation.

Description of the change

Here's the fix for the file-ids. Sorry about that.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'wikkid/filestore/bzr.py'
--- wikkid/filestore/bzr.py 2011-06-30 16:04:37 +0000
+++ wikkid/filestore/bzr.py 2011-06-30 17:26:51 +0000
@@ -12,6 +12,7 @@
12from zope.interface import implements12from zope.interface import implements
1313
14from bzrlib.errors import BinaryFile, MalformedTransform14from bzrlib.errors import BinaryFile, MalformedTransform
15from bzrlib.generate_ids import gen_file_id
15from bzrlib.merge3 import Merge316from bzrlib.merge3 import Merge3
16from bzrlib.osutils import splitpath, split_lines17from bzrlib.osutils import splitpath, split_lines
17from bzrlib.revision import NULL_REVISION18from bzrlib.revision import NULL_REVISION
@@ -69,12 +70,11 @@
69 prev_trans_id = trans_id70 prev_trans_id = trans_id
70 for parent_path, tail in iter_paths(path):71 for parent_path, tail in iter_paths(path):
71 trans_id = tt.trans_id_tree_path(parent_path)72 trans_id = tt.trans_id_tree_path(parent_path)
72 tt.adjust_path(tail, trans_id, prev_trans_id)
73 if tt.tree_kind(trans_id) is not None:73 if tt.tree_kind(trans_id) is not None:
74 break74 break
75 tt.adjust_path(tail, trans_id, prev_trans_id)
75 tt.create_directory(trans_id)76 tt.create_directory(trans_id)
76 tt.version_file(trans_id, trans_id)77 tt.version_file(gen_file_id(tail), trans_id)
77 prev_name = tail
78 prev_trans_id = trans_id78 prev_trans_id = trans_id
7979
8080
@@ -348,7 +348,8 @@
348 if tt.tree_kind(trans_id) is not None:348 if tt.tree_kind(trans_id) is not None:
349 tt.delete_contents(trans_id)349 tt.delete_contents(trans_id)
350 else:350 else:
351 tt.version_file(trans_id, trans_id)351 name = splitpath(path)[-1]
352 tt.version_file(gen_file_id(name), trans_id)
352 create_parents(tt, path, trans_id)353 create_parents(tt, path, trans_id)
353 tt.create_file(content, trans_id)354 tt.create_file(content, trans_id)
354 try:355 try:

Subscribers

People subscribed via source and target branches