[RFC] metaweave format
Olaf Conradi
oohlaf at gmail.com
Fri Apr 28 15:13:21 BST 2006
On 28/04/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Olaf Conradi wrote:
> > Hi
> >
> > Partly because of https://launchpad.net/products/bzr/+bug/41885
> > and for compatability with 0.8rc1, I would like to see a
> > --format=metaweave.
> >
> > I also modified the help of bzr init-repo. We could, just like bzr
> > help init, only notify metadir as supported format. And hide all the
> > other formats in help.
> >
> > http://deschacht.student.utwente.nl/bzr/bazaar-vcs/bzr.olaf.metaweave/
> >
> > -Olaf
> >
>
> I think the real fix is to have "metadir" do what you have defined as
> "metaweave".
>
> That is what it used to do, and I think what was intended.
>
> However, "metaweave" might be a better name for it.
>
> If we use "metaweave" I would probably get rid of "metadir" entirely. We
> have "knit" which is a Metadir + knits, and "metaweave" which is
> metadir+weaves, and "weave" which is the old all-in-one format.
>
> John
My first intention was to modify bzr init-repo --format=weave to
produce a metaweave, but lifeless thought it would be too confusing if
the format depends on the command.
How about this:
We can leave metadir as the format to define the default one, and have
both init and init-repo query it. That way metadir does not need to be
deprecated and we have a single place for the default.
=== modified file 'a/bzrlib/builtins.py'
--- a/bzrlib/builtins.py
+++ b/bzrlib/builtins.py
@@ -912,6 +912,8 @@
]
def run(self, location=None, format=None):
from bzrlib.branch import Branch
+ if format is None:
+ format = get_format('metadir')
if location is None:
location = u'.'
else:
@@ -963,10 +965,9 @@
' a working tree')]
aliases = ["init-repo"]
def run(self, location, format=None, trees=False):
- from bzrlib.bzrdir import BzrDirMetaFormat1
from bzrlib.transport import get_transport
if format is None:
- format = BzrDirMetaFormat1()
+ format = get_format('metadir')
transport = get_transport(location)
if not transport.has('.'):
transport.mkdir('')
More information about the bazaar
mailing list