change branches in shared repository from trees to no-trees

Asked by Daniel Kończyk

I moved my project repository from subversion using the svn2bzr tool
My repository consisted of trunk and 1 development branch, which both have been converted into shared bzr repository with working trees. I merged my dev branch under bzr into the trunk and now, after cleaning the trunk tree, I wanted to start working on the project using bzr.

This is a web project and it would be nice to be able to see different branches in the web browser, because I'd like to work on a few things at one time. After reading the docs, it looks to me, that it would be better to maintain a no-trees shared repository and instead of working on the trees in the repo, I'd better work on the checkout in the selected directory, which would be also pointed at in the virtual host configuration. If I'd want to work on different branch and see it in the web browser, I could use bzr switch in my work dir. Is that correct? Now, I'm scratching my head, how to convert my trunk branch (the other branch is not important, because it's life ended) into a no-tree branch. It's probably an easy thing to do, but I couldn't find any information about it and I don't want to destroy anything. Lot's of info about starting branches etc., but lack of info what to do when you already have branches etc.

I would also like to change the default of my shared repo from trees to no-trees, so I don't have to remember it when creating new branches (which should be no-trees).

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
John A Meinel
Solved:
Last query:
Last reply:
Revision history for this message
John A Meinel (jameinel) said :
#1

The "cheating" way is to do:

touch .bzr/repository/no-working-trees

It would be something that we would add to the "bzr reconfigure" command, but at the moment I don't see it as an option. Something like 'bzr reconfigure --no-working-trees' or something to that effect, though options to reconfigure are subject to quite a bit of discussion, because it operates on lots of different objects (the repo, the branch, the working tree).

Revision history for this message
Daniel Kończyk (drmartens) said :
#2

Thanks John.

If I understand your message correctly, touching .bzr/repository/no-working-trees will just change the default value for the whole shared repository, but will target only future branches.

So I still need to figure out what to do with the old branches, that were created with working trees. Correct me if I'm wrong, please.

Revision history for this message
Best John A Meinel (jameinel) said :
#3

For a branch that has a working tree, you can use "bzr remove-tree" to get rid of it. 'remove-tree' should do enough safety checks that you won't lose any uncommitted changes, etc.

Revision history for this message
Daniel Kończyk (drmartens) said :
#4

Oops...how did I miss that one? :) Ok, I followed your advices above and fixed my repo, did a lightweight checkout and played a bit with commiting and switching branches - works wonderfully. My problem is solved. Thank you!

Revision history for this message
Daniel Kończyk (drmartens) said :
#5

Thanks John A Meinel, that solved my question.