Re: CVS question

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 07 Apr 2001 10:50:53 +0200

I don't have a script to automate the all of it you, but it is only one
CVS command to undo the merge, and then a couple to clean up unneeded
tags..

Things are pretty cool unless you have deleted the
Z-cpuProfiling_merge_HEAD tracking tag (the cvsmergeinit/cvsmerge
scripts does not do this, it must be done manually as it is quite
dangerous for the tracking.. see CVS.html)

Go to your cpuProfiling working directory and back out the merge:

   cvs update -jZ-cpuProfiling_merge_chunked_mempools
-jZ-chunked_mempools_merge_HEAD -kk

and it should back out the changes from your working directory.

Note: if chunked_mempools is up to date wrt HEAD then the above can be
simplified to
   cvs update -jchunked_mempools -jHEAD -kk
but using the merge tags is safer...

then

   cvs commit

to make it permanent

Then you need to clean up the "bogous" branch tracking tags (well, you
do not need to, but it is a good idea):
   cvs rtag -d Z-cpuProfiling_merge_chunked_mempools squid
   cvs rtag -d Z-cpuProfiling_merge-new_chunked_mempools squid

How to completely close a branch if you want to start over from scratch
is doccumented on CVS.html, but shouldn't be needed. Note: If you
haven't cleaned up any of the tracking tags you will have two basetags
that you need to remove the merge tags for (four cvs rtag -d ...
commands, two of them listed above, the other two using HEAD instead of
chunked_mempools).

The two tracking tags used by the scripts are:

Z-<branchname>_merge_<basebranch>
indicates the current branchpoint

Z-<branchname>_merge-new_<basebranch>
is a temporary tag used during merging. Kept permanently in the
repository only to avoid modifying all the repository files on every
merge by adding/deleting the tag... I backup the repository with rsync
every now and then, and it was annoying to get changes in all the files
only because of this, and it is also unneddedly risky for the file
health to have that many modifications all the time..

If you have deleted the Z-cpuProfiling_merge_HEAD tag then you need to
either restore this tag, or start over from scratch.

/Henrik

Andres Kroonmaa wrote:

> I think I've done a stupid merge. How is a proper way to undo it?
>
> I had:
>
> HEAD -> chunked_mempools
> HEAD -> cpuProfiling
>
> and I merged chunked_mempools into cpuProfiling. Now I have sort of:
>
> HEAD -> chunked_mempools -> cpuProfiling
>
> But this is not proper for cpuProfiling I guess.
>
> I could remove cpuProf completely and start over with it, but I'm
> not sure how to cleanly remove all references to it in cvs.
>
> Is there any easy way to "unmerge" ? ;)
>
> I did:
>
> cpuProfiling> cvsmergeinit chunked_mempools HEAD
> cpuProfiling> cvsmerge chunked_mempools
>
> What I actually wanted, was:
>
> /-> chunked_mempools \
> HEAD -> combined
> \-> cpuProfiling /
>
> ------------------------------------
> Andres Kroonmaa <andre@online.ee>
> CTO, Delfi Online
> Tel: 6501 731, Fax: 6501 708
> Pärnu mnt. 158, Tallinn,
> 11317 Estonia
Received on Sat Apr 07 2001 - 03:27:22 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:44 MST