I created a tag with:
svn copy http://localhost/svn/trunk/projectX \
http://localhost/svn/tags/projectX-0.9 -m "Tag ProjectX Release 0.9"
which commited at revision 20.
For a new working copy in which I was originally not going to modify any
files, I checked out my files from a tag dir something like:
cd ~
mkdir mywc
cd mywc
svn checkout http://localhost/svn/tags/projectX-0.9 .
Subsequently I decided to make changes in that WC but forgot that it was
checked out from the tag and not the trunk, thus
http://localhost/svn/tags/projectX-0.9/ had changes commited to it.
I was able to merge those changes into the trunk (which didn't have
changes) with something like this:
cd ~
mkdir fixtrunk
cd fixtrunk
svn checkout http://localhost/svn/trunk/projectX .
svn merge -r 20:31 http://localhost/svn/tags/projectX-0.9 .
svn commit -m \
"Merge /tags/projectX-0.9 between rev 20 & 31 into /trunk/projectX"
Where HEAD was at revision 31 at the time.
I could then go to my main wc and switch without changes:
cd ~/mywc
svn switch http://localhost/svn/trunk/projectX
And it switched without problem and without changes. Perfect.
The last step to fix things is to get http://localhost/svn/tags/projectX-0.9
back to its state at revision 20. I know I could probably delete and
re-tag:
svn rm http://localhost/svn/tags/projectX-0.9 -m \
"Remove accidentally modified tag"
svn copy -r 20 http://localhost/svn/trunk/projectX \
http://localhost/svn/tags/projectX-0.9 -m "Tag ProjectX Release 0.9
(try #2)"
But is that the canonical way of dealing with this type of screw-up?
Thanks for any help you can give!
Cheers...
Bruce
(previous lurker in dev@sunversion.tigris.org,
new "productive" user of SubVersion)
P.S. I saw the thread last year on putting the pre-commit hook that
blocks modifications to /tags...anyone have a "canned" script with
instructions on how to install? I'll probably research it and find it
myself, but if someone can point me in the right direction, I would
appreciate it!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Feb 10 03:38:02 2004