When working with a subdirectory in a repository, how to find the revision when that specific directory has been added to the repository? By using "svn info http://.." I can find out when it was modified for the last time ("Last Changed Rev"), but I also need to find out the revision number of the commit when that directory (or file) was added for the first time (it's "first" revision).
I have been searching for that at the "SVN book", googling, but, obviously, I got no results.
Note: I need this for making a PHP script which downloads logs and stores them locally, just to make it clear and avoid "use tortoise/svnx/versions/you_name_it application" ;)
To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.
Click the revision button at top-right and change it to the revision you want. Then right-click your file in the browser and use 'Copy to working copy...' but change the filename it will check out, to avoid a clash.
If you want to see the difference between the last committed revision and your working copy, assuming that the working copy hasn't been modified, just right click on the file. Then select TortoiseSVN → Diff with previous version.
Display the differences between two paths. The ways you can use svn diff are: Use just svn diff'to display local modifications in a working copy. Display the changes made to TARGET s as they are seen in REV between two revisions.
You could use svn log, with a reverse revision range:
svn log -r 1:HEAD --limit 1 <REPO_URL>
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