How do i can get creation date of a branch using shell commands. I need only the full date (e.g 2010-06-20 13:05:57 ) that i will use in my script as a variable.
Thank you
Select the folder in your working copy which you want to copy to a branch or tag, then select the command TortoiseSVN → Branch/Tag.... If you can't remember the naming convention you used last time, click the button on the right to open the repository browser so you can view the existing repository structure.
To create a branch or a tag in a Subversion repository, do the following: From the main menu, choose VCS | Subversion | Branch or Tag. Alternatively, select the source folder in the SVN Repositories tool window and choose the Branch or Tag command from the context menu.
You can grab the revision information containing this data using svn log
with --stop-on-copy
to omit anything before branch creation, and --limit 1
to omit anything after. --quiet
also helps, to remove the log message, since you're not interested in that:
svn log --limit 1 --stop-on-copy --revision 1:HEAD --quiet
This gives you a bunch of stuff in a string with the date, not the date by itself. To trim it, you need to pipe the output into another command. The answers to How can I extract just the formatted date fields using sed or grep? show how you can use sed, grep, perl, or even the "date" command to accomplish this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With