Hello Nicolas,

On Wed, May 27, 2015 at 3:12 PM, Nicolas Ramz <nicolas.r...@gmail.com> wrote:
> Is there a way to detect that current directory is the root of SVN
> repositiory by reading files into .svn directory ?
>
> I think "svn info" could be used for that. Problem is that some machines may
> not have access to "svn" command line (if using tortoise and svn is not in
> command PATH for example).
>
> In case "svn info" (or any other command line) is the only way, what would
> be the proper way to do it ?

Beginning with Subversion 1.8, `svn info` prints repository-relative
URLs. See Subversion 1.8 Release Notes entry at
http://subversion.apache.org/docs/release-notes/1.8.html#svn-info.

For example, if you run `svn info` at the root of the repository, you'll see
[[[
...
Relative URL: ^/
Repository Root: https://svn.example.com/svn/TestRepo
...
]]]

If you run `svn info` in a subtree, you'll see

[[[
...
Relative URL: ^/TestProject/trunk
Repository Root: https://svn.example.com/svn/TestRepo
...
]]]

--
With best regards,
Pavel Lyalyakin
VisualSVN Team

Reply via email to