[RFC] Commit Builder restructuring (Re: [RFC] letting the commit builder assign the file ids)
Jelmer Vernooij
jelmer at samba.org
Thu Dec 21 16:30:09 GMT 2006
On Thu, 2006-12-21 at 11:00 -0500, Aaron Bentley wrote:
> Jelmer Vernooij wrote:
> > On Thu, 2006-12-21 at 09:29 -0500, Aaron Bentley wrote:
> >>Jelmer Vernooij wrote:
> >>
> >>>Thoughts?
> >>
> >>Could you explain why the bzr-svn generates new file ids at commit time?
> >> Why doesn't it do that when you import a branch from bzr?
> >
> > Well, that's when it usually generates file ids.
> Eh? You mean it generates new file ids on import? I thought that
> bzr-svn was able to roundtrip bzr data.
>
> If it can, then it should be able to use that mechanism instead of
> generating new file ids.
> If it can't, we should be aiming at that instead.
That's a good point. I realise now that I'm approaching this the wrong
way. Even if I could let bzr-svn do the assigning of file-ids, that
would break when, for example, pushing revisions to a Subversion branch.
> > foo foo--20061221151143-50yaxntdektqvtue-1
> > $ bzr commit
> > ^^ bzr-svn will assign a different file-id to "foo",
> Why? SVN doesn't have file-ids, so it can't be intrisic to SVN. It
> sounds as if bzr-svn is assigning new file-ids for no good reason.
Since bzr-svn has to be consistent in what data it returns for a
particular branch, it needs to return the same file ids everywhere. At
the moment, the following syntax is used:
svn-v<MAPPING_VERSION>:<REVNO>@<UUID>-<BRANCHPATH>-<PATH>
I guess we'd need to store a mapping between those ids and the ids known by bazaar in a svn property.
> >>CommitBuilder.set_working_tree(wt)
> >
> > ^^ wt would be any Tree, not necessarily a WorkingTree ? I think it
> > should be possible to do a commit without a working tree.
>
> > And a sideeffect of record_change() could be that the file id of one
> > entries in CommitBuilder.working_tree would change?
> I find these inconsistent.
Well, it could change them if it was a WorkingTree and not change them
if it wasn't. That's even more inconsistency, I admit.
Thanks for your comments. I'm now convinced file ids shouldn't be
modifiable by the commit builder, I'll have a look at storing a map in
svn.
Cheers,
Jelmer
--
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
More information about the bazaar
mailing list