monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] fixing poor branch names


From: Ludovic Brenta
Subject: Re: [Monotone-devel] fixing poor branch names
Date: Sat, 23 Jun 2007 02:02:20 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

"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

-- 
Ludovic Brenta.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]