|
From: | graydon hoare |
Subject: | [Monotone-devel] Re: renaming branches |
Date: | Tue, 06 Apr 2004 12:57:51 -0400 |
User-agent: | Mozilla Thunderbird 0.5 (X11/20040208) |
Gerhard Schuck wrote:
simple question: Is it possible to rename (or delete) branches? The output of 'list branches' is getting too chaotic, I need to reorganize it a little bit. I guess it will be possible on database level, but how?
it's possible, yes. you'd need to reissue new branch certs with the new names, and delete branch certs with the old names. there's no command to do this at the moment. it's possible to add one. doing it by hand at the moment would be a bit of a pain, unfortunately; the cert values (branch names) are all base64 encoded (with a trailing \n), so you need to do something awful like:
FROM=$(echo -n $OLD_BRANCH | mimencode)IDS=$(monotone debug "$(printf "select id from manifest_certs where name='branch' and value='%s\n'" $FROM)" | grep -v row) monotone debug "$(printf "delete from manifest_certs where name='branch' and value='%s\n'" $FROM)"
for i in $IDS do monotone cert manifest manifest $i branch $NEW_BRANCH doneit'll probably be more sensible to make a "monotone branch rename" command which does this internally, since it's so awful.
-graydon
[Prev in Thread] | Current Thread | [Next in Thread] |