clean-tree in bzr core?

Tim Penhey tim at penhey.net
Tue Aug 5 05:05:27 BST 2008


On Tuesday 05 August 2008 10:08:59 Gary Wilson Jr. wrote:
> John Arbash Meinel wrote:
> > I think it would be fine to bring in. I'm curious how other people would use
> > it, and how you feel it would be appropriate for a generic project, rather
> > than its current fairly bzr-specific implementation.
> 
> I tend to use a working directory for lightweight checkouts of branches, 
> and when I want to checkout a new branch to the working directory I do:
> 
> rm working/.bzr -rf
> bzr branch new-feature working
> cd working
> bzr resolve --all
> bzr clean-tree
> 
> (If there is a better way of doing the above, please do tell.)  I wasn't 
> aware that clean wasn't core already, so I'd have no problems with it 
> moving.  That said, I do think I would rather the command be just 
> "clean" as I usually forget the "-tree" the first time around.

Surely switch would be easier if you want to keep the same tree.

Personally I also use lightweight checkouts.  I have a structure that looks

  ~/src/bzr/trunk

To create a branch and build the tree I use

  tim at spike:~src/project$ bzr cbranch trunk feature-x

where cbranch is aliased to 'cbranch --lightweight --hardlink'

and locations.conf has:

[/home/tim/src/bzr]
cbranch_target = /home/tim/repo/bzr
cbranch_target:policy = appendpath

This way when I'm finished with a branch, I go:

  tim at spike:~src/project$ rm -r feature-x

Tim



More information about the bazaar mailing list