[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: Florian Weimer <fweimer_at_bfk.de>
Date: Mon, 29 Nov 2010 09:00:36 +0000

* Stephen Connolly:

> Have you considered doing a binary search to find the revision that it was
> deleted in?
>
> svn ls .../test_at_2
> Exists
> svn ls .../test_at_HEAD
> No such file in revision 50002
> svn ls .../test_at_25002
> Exists
> svn ls .../test_at_37502
> No such file
> svn ls .../test_at_31252
> Exists, etc
>
> You'll get the revision in at most log2 HEAD iterations

If the path has been deleted multiple times, the result won't be
stable in the sense that you're guaranteed to get the same answer if
further (unrelated) commits are made. This could be quite confusing.

-- 
Florian Weimer                <fweimer_at_bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99
Received on 2010-11-29 10:01:13 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.