[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to see when an item was added using svnlook?

From: Branko ÄŒibej <brane_at_apache.org>
Date: Tue, 2 Jan 2018 13:51:48 +0100

On 02.01.2018 13:27, Bo Berglund wrote:
> On Tue, 2 Jan 2018 09:42:07 +0100, Branko ?ibej <brane_at_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

Oh for goodness' sake, please use an existing mailer script that already
does all of that. Don't reinvent the wheel. The mailer we have in the
Subversion repository shows the log message, what changed in the commit
and the complete diff; you could easily adapt it for your needs.

("revision it was last changed before this commit ... I'm not sure why
you need this info; you don't need it to generate the diff.)

> 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...

Well here I can't help you other than to suggest that "mastering" a
language is not a prerequisite to customizing a script. Python isn't
that hard to understand.

Alternatively, you could investigate some existing freely (or not so
freely) available development tools that have all this integrated. I
won't post links to commercial offers on this list, but they're just one
search away.

-- Brane
Received on 2018-01-02 13:51:52 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.