[RFC] letting the commit builder assign the file ids

Martin Pool mbp at canonical.com
Thu Dec 21 04:12:05 GMT 2006


On 21 Dec 2006, Jelmer Vernooij <jelmer at samba.org> wrote:
> The CommitBuilder can currently assign the revision id when a commit is
> made. This is useful for foreign branches, as the foreign branch
> implementation can then determine the revision id. 
> 
> File ids are currently generated whenever a file is added to the working
> tree. However, these file ids are not stored by plugins such as bzr-svn.
> This causes problems when commits are made from a bazaar checkout to a
> subversion branch. Since bzr-svn creates different file ids for the
> files that are added than the file ids in the local branch, both
> branches will contain the same file contents and names, but possibly
> different file ids for some files.
> 
> I can't really figure out a way to handle this properly. File ids will
> always have to be generated by the working tree as it needs to be
> possible to operate on those files before the commit. One solution would
> be to always regenerate the working tree from the revision committed
> after a commit, though that might be a bit ugly and have some corner
> cases (partial commits etc).
> 
> Thoughts?

I think it would be ok for the commit builder to have read/write access
to the working inventory and to change the file ids during the commit.
I expect it only wants to do that for files newly added and
first committed to svn.

-- 
Martin




More information about the bazaar mailing list