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). > > So far I have not found a way to do it... > > svnlook history <repo> <project>/branches/<branchdir> > shows a lot of revisions which are for changes to any file within the > directory, but not the addition commit for the actual directory itself > AND unrelated directories (the command below is on one line):
The directories are not unrelated. > D:\>svnlook history D:\SVN\test\bosse > /CVSMailer/branches/Branch_Rel_1-2-9 -l 5 > REVISION PATH > -------- ---- > 120 /CVSMailer/branches/Branch_Rel_1-2-9 > 119 /CVSMailer/branches/Branch_Rel_1-2-9 > 103 /CVSMailer/branches/Branch_Rel_1-2-9 > 100 /CVSMailer/trunk > 98 /CVSMailer/trunk > ... 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. > 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. > I have read the whole SVNBook 1.7 chapter on svnlook but did not find > an obvious candidate. > > If I know the revision I can get additional information using svnlook: > > D:\>svnlook info -r 699 D:\SVN\test\bosse > cvs2svn > 2006-04-22 23:17:29 +0200 (lö, 22 apr 2006) > 79 > This commit was manufactured by cvs2svn to create tag > 'Rel_1-5-2-50_20060422'. > > 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. What are you actually trying to achieve? 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. -- Brane