"Corey Sweeney" <[EMAIL PROTECTED]> 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.



_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to