No subject


Thu Jul 23 19:07:19 BST 2009


is something really needed.

As I said earlier, I see a very common use case for split implemented on top 
of fast-import-filter. What I don't see is a practical use case for split as 
it is now. For example a Google search for "bzr split" returned no articles 
or tutorials about that commands. Does anybody use it?

The common use case for split as I suggest is as follows. A team develops a 
big project (let's say a database). after a bit of time (years) the code is 
refactored and it is seen that a certain part of the project (the Makefile 
generator) could live as a separate project and should be split from the 
original project. Luckily it is all contained in the tools/makegen 
directory. Now, if they had a bzr split command that behaves like fast-
export + fast-import-filter they could split that directory, create a 
project on launchpad for the Makefile generator and upload a 200 KB branch 
with a dozen of file. With the current split command, the history could be 
as a big as 20 or 40 MB and would contain references to completely unknown 
files (unknown to the Makefile generator users). Is merging useful in this 
case? No, the directory lives its one life as a new project and both the 
original project and new projects would use something like 'bzr link-tree 
lp:makefile-gen tools/makegen' (bzr link-tree is, maybe, more explanatory 
than bzr join).

Back to practical use: do you think this kind of scenario happens too 
infrequently to justify a dedicated command? If so, how often is "split", as 
is now, used?

> We would never want to entice users to rewrite history.  It is necessary
> in some circumstances, but it is a serious decision, and not something
> we would want to present to users without them having a full
> understanding of the consequences.

This hypothetical sequence of commands would not rewrite history, it would 
write another history somewhere else in another branch.

  bzr init-repo ~/Projects/Makefile-gen
  bzr split tools/makegen ~/Projects/Makefile-gen/trunk
  (split performs
     * fast-export | fast-import-filter -i tools/makegen > /tmp/makegen.fi
     * bzr rm tools/makegen
     * bzr init ~/Projects/Makefile-gen/trunk
     * (cd ~/Projects/Makefile-gen/trunk; bzr fast-import /tmp/makegen.fi)
  )
  bzr link-tree ~/Projects/Makefile-gen/trunk

No history harmed, a new small and light project created.

> And what is your argument against join, btw?
Well, join should be adapted to match the new split, that's all.

Thank you for paying attention to my request for a new split command. I 
understand that the 2.0rc1 release is near and I don't wont to waste the 
time of developers pushing this new split semantics, there are more 
important features to work on. I just think, as Matthew D. Fuller pointed 
out, the 2.0 release is a good occasion to do changes that cannot be easily 
done in minor releases.

Regards,

-- 
Gioele Barabucci <gioele at svario.it>





More information about the bazaar mailing list