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

Re: svn_fs_lock multiple paths

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 07 Feb 2014 11:28:57 +0000

Philip Martin <philip.martin_at_wandisco.com> writes:

> I'm working on a new svn_fs_lock that allows multiple paths to be
> locked. This is to avoid the inefficiency of writing the large digest
> files multiple times when locking multiple paths one at a time. I have
> the low level file handling written but the plumbing to connect it all
> up is a bit tricky.

Another bit of the API that's causing a problem: canonical paths. The
existing svn_fs_path implementation calls svn_fspath__canonicalize on
its input paths which means that a variety of different inputs produce
the same result, e.g. "/A/f", "A/f", "/A///f", etc. all work.

When svn_fs_lock supports multiple paths how should it behave when more
than one input path refers to the same canonical path? Should it detect
duplicates and fail up front? Should it act on the canonical path only
once and produce fewer "results" than inputs? Should it act on the
canonical path multiple times, perhaps locking the first time and
failing subsequently, or locking every time with --force? Should it be
stricter that the single path function and fail on all non-canonical

The repos layer runs the pre-lock hooks on each path so whatever the FS
layer does probably has to duplicated in the repos layer.

Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-02-07 12:29:40 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.