[MERGE] Allow changing --[no-]trees with reconfigure (bug 145033)
Marius Kruger
amanic at gmail.com
Mon Jan 19 07:30:29 GMT 2009
2009/1/19 Matthew D. Fuller <fullermd at over-yonder.net>
> On Sun, Jan 18, 2009 at 09:55:45PM +0200 I heard the voice of
> Marius Kruger, and lo! it spake thus:
> >
> > Behold this is a problem: if it is runned within a branch&tree, it
> > deletes the workingtree!
>
> What? No it doesn't, any way I can try. If it can't find a shared
> repo, it errors out. If it does, the code paths added are:
>
> if self._set_with_trees:
> self.repository.set_make_working_trees(True)
> if self._set_with_no_trees:
> self.repository.set_make_working_trees(False)
>
> and neither of those touches a WT (or a branch for that matter). They
> just make a file in the repo.
>
> Is it actually doing this for you?
yes, when you run it from within a WT
How can I reproduce it?
==
$ bzr init-repo r
Shared repository with trees (format: pack-0.92)
Location:
shared repository: r
$ bzr init r/b
Created a repository tree (format: pack-0.92)
Using shared repository: /tmp/r/
$ cd r/b
$ echo x > x
$ bzr add x
added x
$ bzr ci -m x
Committing to: /tmp/r/b/
added x
Committed revision 1.
$ ls
x
$ bzr reconfigure --with-no-trees
$ ls
(x is gone)
==
bzr reconfigure --with-trees also has this effect.
But after some more experiments, I found that if there are uncommitted
changes to the workingtree, it at least refuses to delete it:
$ bzr reconfigure --with-no-trees
bzr: ERROR: Working tree "/tmp/r/b/" has uncommitted changes.
So its not as dangerous as I thought, but I still think it is undesirable
to have my existing working tree removed by this command.
I suppose that if you really want this to run properly from a working tree,
you can detect the proper values for the following to make sure you don't
change anything, but that sounds more problematic to me.
reconfiguration._plan_changes(*want_tree=False, want_branch=False,
want_bound=False,
want_reference=False,*
want_shared_repository=True)
reguards
marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090119/c444f5c8/attachment.htm
More information about the bazaar
mailing list