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

Re: AW: How to find out the rev number where a file was deleted?

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Mon, 29 Nov 2010 10:55:29 -0600

On 11/29/2010 4:23 AM, Ludwig, Michael wrote:

>
>>> 4. Quite (un)surprisingly, my intent is to actually find revision,
>>> in which the destruction was made. Because, quite (un)surprisingly,
>>> I don't know that.
>>
>> I'd like to be able to see the future too - but unfortunately, neither
>> subversion nor I can do that.
>
> From the user's perspective, it's most definitely not the future he's
> asking Subversion to show, but the past.

Yes he is, because he is identifying the peg rev but wants the log to
give the history of HEAD which is in the future as far as anything that
could have been written at the time of that rev, and in fact is a place
where the item doesn't exist.

> Thanks for this interesting discussion. I often wondered whether what
> Andrey is asking was possible and whether there was anything better than
> my tentative poking at moreless random peg revs in the repo to find the
> moment a file disappeared, or came into being.
>
> Binary search on the 0 to HEAD revision range is a possibility, but it's
> also a rather wasteful workaround.

Fisheye (a commercial product) does a brute-force extract/index of all
the filenames and content in all revs in a repo for quick searches. I'm
not sure if there is any equivalent open source program but this is
probably the right answer for anyone who needs to do that frequently.
If you don't know exactly what you are looking for, you might only
remember a piece of content instead of the name. Fisheye can find it
either way.

> What's really needed, I think, is an index on the URL maintained by the
> server that points to the revision ranges where the node existed. That
> would allow me to do a lookup on any given URL and quickly see whether
> it has ever existed, and when precisely; or not at all.

There's a big problem here - whether a URL exists or not usually isn't
the right answer for things that have been deleted and replaced by
something else of the same name. What you usually want is the history
of only one of those things - which may track backwards through renames
or have been copied from somewhere else. A thing with the same name
added later as a replacement may have nothing in common with the item
you want. I'm not sure what the right test for this would be other than
asking for a log with a rev range and a peg rev to anchor it to one
specific version.

-- 
   Les Mikesell
     lesmikesell_at_gmail.com
Received on 2010-11-29 17:56:11 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.