I am creating my first project in Subversion. So far I have
branches
tags
trunk
I think I immediately need to make branches singular and sta
Another option to tag a Subversion repository is to add the tag to the svn:log property like this:
echo "TAG: your_tag_text" > newlog
svn propget $REPO --revprop -r $tagged_revision >> newlog
svn propset $REPO --revprop -r $tagged_revision -F newlog
rm newlog
I recently started thinking that this is the most "right" way to tag. This way you don't create extra revisions (as you do with "svn cp") and still can easily extract all tags by using grep on "svn log" output:
svn log | awk '/----/ {
expect_rev=1;
expect_tag=0;
}
/^r[[:digit:]]+/ {
if(expect_rev) {
rev=$1;
expect_tag=1;
expect_rev=0;
}
}
/^TAG:/ {
if(expect_tag) {
print "Revision "rev", Tag: "$2;
}
expect_tag=0;
}'
Also, this way you may seamlessly delete tags if you need to. So the tags become a complete meta-information, and I like it.
You are correct in that it's not "right" to add files to the tags folder.
You've correctly guessed that copy
is the operation to use; it lets Subversion keep track of the history of these files, and also (I assume) store them much more efficiently.
In my experience, it's best to do copies ("snapshots") of entire projects, i.e. all files from the root check-out location. That way the snapshot can stand on its own, as a true representation of the entire project's state at a particular point in time.
This part of "the book" shows how the command is typically used.
Could use Tortoise:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-branchtag.html
Try this. It works for me:
mkdir <repos>/tags/Release1.0
svn commit <repos>/tags/Release1.0
svn copy <repos>/trunk/* <repos>/tag/Release1.0
svn commit <repos/tags/Release1.0 -m "Tagging Release1.0"
svn copy http://URL/svn/trukSource http://URL/svn/tagDestination -m "Test tag code"
$error[0].Exception | Select-object Data
All you have to do change URL path. This command will create new dir "tagDestination". The second line will be let know you the full error details if any occur. Create svn env variable if not created. Can check (Cmd:- set, Powershell:- Get-ChildItem Env:) Default path is "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe"
Use:
svn copy http://svn.example.com/project/trunk \
http://svn.example.com/project/tags/1.0 -m "Release 1.0"
Shorthand:
cd /path/to/project
svn copy ^/trunk ^/tags/1.0 -m "Release 1.0"