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

RE: how to detect read-only branch from client?

From: Andrew Reedick <jreedick_at_incomm.com>
Date: Tue, 14 Feb 2017 17:32:06 +0000

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, e.g.
        svn mkdir -m "" http://server/repo/dir2test/a http://server/repo/readonly/z

However, it looks like the urls are sorted and then processed in sort order (including for svnmucc.) So you need your test url to come before your "will always fail" readonly url. Getting the sorting figured out is left an exercise to the reader. Maybe someone else knows of a way to ensure that the "always fail" readonly url gets checked last regardless of windows sorting, linux sorting, LC_ALL/LC_COLLATE settings, etc.

-----Original Message-----
From: Torsten Mueller [mailto:muellerto_at_runbox.com]
Sent: Monday, February 13, 2017 11:51 AM
To: users_at_subversion.apache.org
Subject: how to detect read-only branch from client?

I write a script getting sources from one repository, doing a build and other time consuming things and then committing the results into another repsitory.

The problem is: the detination side is "managed" which means that I must expect read only branches there. They use the path based authentication feature (see VisualSVNServer) without any communication. They want to close a branch for commits, that's enough communication.

But in my case it would be very bad to start a process which runs for an hour or longer and then fails because it can't do the final commit.

How can I detect if a path in the destination directory is read only without modifying it?

My first guess was to use "svnmucc propdel" to delete a property which doesn't exist. This works great on a branch which is read only. But on the other side it creates always a revision on normal branches. That's not good. What can I do?

T.M.
Received on 2017-02-14 18:32:25 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.