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

Re: Document return codes of 'svn ls'

From: anatoly techtonik <techtonik_at_gmail.com>
Date: Thu, 20 Jan 2011 23:11:33 +0200

On Thu, Jan 20, 2011 at 8:29 PM, Hyrum K Wright <hyrum_at_hyrumwright.org> wrote:
> On Thu, Jan 20, 2011 at 3:41 AM, Arwin Arni <arwin_at_collab.net> wrote:
>>
>> On Saturday 15 January 2011 12:24 AM, anatoly techtonik wrote:
>>>
>>> Hello,
>>>
>>> How can I know if a file is not present in specific revision?
>>>
>>>  From one side I can run 'svn ls' and if it returns 0 when file exists,
>>> but if 'svn ls' returns 1 it is impossible to guess between generic
>>> error and situation when path for file doesn't exist in this specific
>>> revision. Message parsing seems unreliable, because messages seem to
>>> depend on locale. Everything could be fine if return codes allowed
>>> recognizing these conditions. Perhaps there is some other way. Any
>>> hints?
>>>
>>> --
>>> anatoly t.
>>
>> I think you're looking for "svn info".
>> To check if a file existed at revision X,
>>
>> svn info ^/path/to/file_at_X (from inside the wc)
>> svn info URL_at_X
>

This fails if path doesn't exist at specified revision, with:
URL_at_X: (Not a valid URL)

svn: A problem occurred; see other errors for details

svn, version 1.6.15 (r1038135)
Are there other ways to check if a file is present in specific revision?

> As a small aside: the question would have gotten more visibility, and
> probably a quicker response if asked on the appropriate list:
> users_at_subversion.apache.org.
> Best,
> -Hyrum

Thanks for crossposting. I didn't get the previous mail. I have a
feeling that this will turn out to be appropriate ML.

--
anatoly t.
Received on 2011-01-20 22:12:32 CET

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