File-ids including full path
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 27 19:32:16 BST 2007
At some point we changed the code path for new file ids to use their
full relative path rather than just their base name.
I don't think it was intentional.
The side effect is only that we are generating longer file ids than we
would normally.
The fix is just:
=== modified file 'bzrlib/workingtree_4.py'
--- bzrlib/workingtree_4.py 2007-04-25 22:07:09 +0000
+++ bzrlib/workingtree_4.py 2007-04-27 18:30:31 +0000
@@ -165,7 +165,7 @@
state.set_path_id('', generate_ids.gen_file_id(f))
continue
if file_id is None:
- file_id = generate_ids.gen_file_id(f)
+ file_id = generate_ids.gen_file_id(osutils.basename(f))
# deliberately add the file with no cached stat or sha1
# - on the first access it will be gathered, and we can
# always change this once tests are all passing.
Do we want to do this? I don't know that we want tree implementation
tests about file id names (since SVN trees would use a different naming
convention).
The difference is:
bzr add foo/bar/baz
With WT3 this will get an id like:
baz-20070602132324-aofoauba324ab-1
With WT4 it will be:
foobarbaz-20070602132324-aofoauba324ab-1
John
=:->
More information about the bazaar
mailing list