On Friday 21 January 2011 02:41 AM, anatoly techtonik wrote:
On Thu, Jan 20, 2011 at 8:29 PM, Hyrum K Wright<hy...@hyrumwright.org>  wrote:
On Thu, Jan 20, 2011 at 3:41 AM, Arwin Arni<ar...@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@X (from inside the wc)
svn info URL@X


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

svn: A problem occurred; see other errors for details


If the URL is not valid at the revision specified, doesn't it imply that the file is absent at that revision too? Am I missing something here?

Regards,
Arwin Arni

Reply via email to