Re: rollback a single subdirectory

Thomas Glanzmann <[email protected]> Tue, 23 Nov 2004 22:52:13 +0100
Newsgroups gmane.comp.version-control.bitkeeper.user
Message-ID <[email protected]>
Hello Mike,

> I'd like to create a branch of our repository that rolls back some
> developmental work in a particular subdirectory.  As an example, I have
> subdirectories FOO and GOO in the same repository.  The current
> changeset is 1.5 (example).  I want to create a branch/repository where
> GOO is completely up-to-date to 1.5, but FOO rolls back to changeset 1.0
> but then also applies changeset 1.3.  The subdirectories contain modules
> that are quite independent (in retrospect, it probably would have been
> better to use seperate BitKeeper repositories for these directories).  

I would do the following steps:

	bk clone -l current rollback
	cd rollback

	# bk changes to find out the state I am interested in.
	bk undo -a<CHANGESET/TAG HERE>

	# This gives the delta between current repository and its parent but only for SUBDIRECTORYHERE
	bk rset -hr`bk repogca`,+ | grep '^SUBDIRECTORYHERE' | bk gnupatch -du -e -h -T > /tmp/patch

	# Bring it back to current level
	bk unpull *OR* bk pull

	# reverse patch the stuff for the one subdirectory ( I don't know if this last
	# step works, because there is no way to tell bitkeeper that this is a reverse
	# patch)
	# WARNING THIS IS BROKEN AND DOESN'T HANDLE ADDITIONS TO NEW FILES WITHOUT MANUAL INTERVENTION
	bk import -tpatch /tmp/patch .

Honestly,
	Thomas
_______________________________________________
Bitkeeper-users mailing list
[email protected]
http://bitmover.com/mailman/listinfo/bitkeeper-users
To unsubscribe from this list, go to the above URL, follow instruction at the bottom of the web page.