On Tue, 2 Jan 2018 09:42:07 +0100, Branko ?ibej <br...@apache.org> wrote:
>On 01.01.2018 21:28, Bo Berglund wrote: >> I am trying to use svnlook to find the revision when a directory was >> created. I want to use this to dig out the timestamps of tags and >> branches. My svn version is 1.9.7 (both server and client). >> ... and the list continues in *trunk* for about 50 lines ... > >Yes, that is correct. You asked for the history of the item; it was >copied (branched) from trunk in r103, and svnlook is showing the whole >history. I noted this and asked if there is a way to get the revision when the directory was actually ADDED thus making it possible to extract the timestamp. I should probably have asked in the subject for the *revision* it was added and that would have given me the tool to get the other info... >> Is there a command to show the revision when an item (directory or >> file) was actually created in svn? > >Currently the only hack to do this is by using 'svn log --stop-on-copy' >in a working copy. This is not going to work on the server using svnlook then.... >> If I know the revision I can get additional information using svnlook: >> >> D:\>svnlook changed -r 699 D:\SVN\test\bosse --copy-info >> A + CVSMailer/tags/Rel_1-5-2-50_20060422/ >> (from CVSMailer/trunk/:r698) >> >> But lacking the revision number when it was added I cannot find the >> extra info like the date... > >"The date" is a revision property. But I am looking for a way to find the revision so this timestamp I am after can be extracted... > >What are you actually trying to achieve? Apart from the timestamp I want for other purposes I am also after the revision for a changed file when it was last changed (forgot this when posting). So I want to create a commit email including info that we are used to having in the emails we get from our earlier system. This includes a list with the following for each changed item: -Item that was changed (dir or file, available in svnlook changed) -revision it was changed (i.e. the commit revision - simple) -revision it was last changed before this commit (how to do this?) -a command to diff the new file version with the previous So my mail will contain this tabular list: Op Item rev previous_rev diff_revs (Op is D U _U or UU from svnlook changed) All but the two last items are simple.... >> There's a good chance that >whatever you're trying to use svnlook for has already been implemented >half a dozen times, using an existing tool might get you to your goal >quite a bit faster. Not for me because all the hook scripts I have looked at are either too simplistic (basically pushing svnlook info and svnlook changed into the mail body) or they are written in a language I do not master... I am almost done now, only lacking a way to find the revision of the last change before the current for all file items in the list of changes. I will skip the diff-revs link for now because it relied on the ViewVc service for the CVS repository where a diff was available and I only had to calculate the url of the proper diff to put into the email. Now I first have to install and make working the ViewVc version which is able to work with svn.... -- Bo Berglund Developer in Sweden