[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] fixing poor branch names
From: |
Timothy Brownawell |
Subject: |
Re: [Monotone-devel] fixing poor branch names |
Date: |
Sat, 23 Jun 2007 18:00:56 -0500 |
On Sat, 2007-06-23 at 18:42 -0400, address@hidden wrote:
> On Sat, Jun 23, 2007 at 02:02:20AM +0200, Ludovic Brenta wrote:
> > "Corey Sweeney" <address@hidden> writes:
> > > Hi everyone. I've been using monotone 0.24 for a while now, and it's
> > > been great. When i first started using monotone, i made some bad
> > > choices in my branchnames (including one branched called 'initial
> > > checkin' :). Now that i understand what the branchnames are for, i'd
> > > like to bring my branch names in line with the naming convention. Is
> > > there a way to do that without loosing the history? I'd really like
> > > to clean up my cluttered namespace.
> > >
> > > (Please cc me on any responces, as i'm not subscribed to the list)
> > >
> > > Corey
> >
> > Supposing you want to "rename" the branch "initial checkin" to
> > "org.corey-sweeney.schmoll", here is how I would do it. I tested this
> > on monotone 0.31 with bash.
> >
> > Step 1: add a new branch certificate
> >
> > $ for rev in $(mtn -d my_db.mtn automate select "b:initial checkin"); do \
> > mtn -d my_db.mtn approve -b org.corey-sweeney.schmoll $rev; \
> > done
> >
> > Step 2: create a new, empty database.
> >
> > $ mtn db init -d new.mtn
> >
> > Step 3: pull everything from the old DB, excluding the unwanted branch
> > certs:
> >
> > $ mtn -d new.db pull --exclude "initial checkin" file:my_db.mtn '*'
> >
> > HTH
> >
> > Step 4: after verifying the results, overwrite the old db with the new
> > one:
> >
> > $ mv -f new.db my_db.mtn
> >
> > HTH
>
> Will this propagate via netsync?
The new branch name will propagate via netsync. The loss of the old
branch name will not, and it will actually come back if you sync with a
server that has those certs.
--
Timothy
Free (experimental) public monotone hosting: http://mtn-host.prjek.net