subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mueller <>
Subject Re: how to detect read-only branch from client?
Date Wed, 15 Feb 2017 07:41:16 GMT
Andrew Reedick <> schrieb:

> Not a complete solution, but it's a start. Craft a "svn mkdir" that
> includes the url to test and a url that will always fail

That's it. The key is to create a nested directory in a branch, this
means a directory which has a non-existing parent, and doing that
without the --parent parameter:

  Test/ro is a readonly branch
  Test/rw is a normal (read/write) branch

  trying to create directory "a/b":

  $ svn mkdir -m"xx" https://repository/svn/Binaries/Test/ro/a/b"
  svn: E175013: Access to '/svn/Binaries/!svn/txr/50-1u/Test/ro/a/b' forbidden
  $ svn mkdir -m"xx" https://repository/svn/Binaries/Test/rw/a/b"
  svn: E160013: Try 'svn mkdir --parents' instead?
  svn: E160013: File not found: transaction '50-1v', path '/Test/rw/a/b'
This gives two distiguishable messages: in the first case it fails
because of the readonly property, in the second case because of the
missing --parent parameter. No revision is made iin both cases - great.

Thanks a lot.


View raw message