how to get bazaar log rid of minor "sandbox" commits?

Kent Gibson warthog618 at gmail.com
Thu Mar 12 02:10:46 GMT 2009



Rahul Nabar wrote:
>   
>> If you want a way to make the history cleaner, that speaks to a
>> requirement for a way for the user to view history ignoring some types
>> of revision. This is very different from removing them from history
>> completely.
>>     
>
> Right; so what are the ways of imposing a heirarchy on revisions. Can
> I have commits of the first order (major changes) and commits of the
> second order (minor sandbox changes)  or some such paradigm? How does
> one do that?
>
> Does Bazaar or a related plugin allow me to do this?
>
>   
The way I'd so this is with another branch, which I will refer to as the
main branch.
You make your minor changes in your working branch, then when you are
happy with them you merge them into the main branch.  They will then
appear one level in from the mainline in that branch.  And you can
filter out them easily by passing the -n1 option to log, or a log
formatter that defaults to -n1 like --short or --line.

i.e. in working branch
<hack hack>
bzr commit -m"Minor change comment 1"
<hack hack>
bzr commit -m"Minor change comment 2"

then in main branch:
bzr merge <working_branch>
bzr commit -m"Major change comment"

Optionally, you can then replace the history on the working branch with
the main branch's (so the minor revisions are off the mainline) by doing

bzr push --overwrite <working_branch>

Cheers,
Kent.



More information about the bazaar mailing list