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

Re: [PATCH 1/3] atomic-revprop: Change error name

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 20 Sep 2010 12:39:34 +0200

Jon Foster wrote on Mon, Sep 20, 2010 at 10:47:05 +0100:
> Hi,
>
> I'm keen to get the atomic-revprop feature working, so I've had a
> go at writing patches for some of the missing bits.
>

Hi, and thanks. :-)

> This first patch gives a unique error code for the case where the
> old_value passed to the revprop change function doesn't match the
> real old value. This allows it to be detected easily. (The
> branch currently overloads SVN_ERR_BAD_PROPERTY_VALUE for this,
> but the same error code is also used if the new value is illegal).
>
> This feature is on the BRANCH-README's TODO list.
>

Yep. I didn't spend time on it because it's a fairly low-hanging fruit
and I preferred to do the heavier lifting (ra_dav work) first.

> The patch is against the atomic-revprop branch, but it also
> applies to trunk.
>
> [[[
> Use a new, distinct error code if svn_fs_change_rev_prop2's old_value_p
> doesn't match.
>
> * subversion/include/svn_error_codes.h:
> (SVN_ERR_BAD_OLD_VALUE): New error code.
>
> * subversion/libsvn_fs_fs/fs_fs.c:
> (change_rev_prop_body): Use SVN_ERR_BAD_OLD_VALUE when appropriate.
>
> * subversion/libsvn_fs_base/revs-txns.c:
> (svn_fs_base__set_rev_prop): Use SVN_ERR_BAD_OLD_VALUE when
> appropriate.
>
> * subversion/include/svn_fs.h:
> (svn_fs_change_rev_prop2): Update documentation.
>
> * subversion/tests/libsvn_fs/fs-test.c:
> (FAILS_WITH_BPV): Rename to...
> (FAILS_WITH_BOV): ... this. Change to test for SVN_ERR_BAD_OLD_VALUE.
> (revision_props): Change to use FAILS_WITH_BOV instead of
> FAILS_WITH_BPV.
>
> Patch by: Jon Foster <jon.foster_at_cabot.co.uk>
> ]]]
>
> Kind regards,
>
> Jon
>
>
> **********************************************************************
> This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.
>
> If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.
>
> Cabot Communications Limited
> Verona House, Filwood Road, Bristol BS16 3RY, UK
> +44 (0) 1179584232
>
> Co. Registered in England number 02817269
>
> Please contact the sender if you believe you have received this email in error.
>
> **********************************************************************
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________

> +++ subversion/include/svn_error_codes.h (working copy)
> @@ -219,6 +219,11 @@
> + /** @since New in 1.7. */
> + SVN_ERRDEF(SVN_ERR_BAD_OLD_VALUE,
> + SVN_ERR_BAD_CATEGORY_START + 14,
> + "Old value doesn't match repository")
> +

Hmm. Not sure if there's a text change to be made here, but I'm not
going to bikeshed about an error text that will never be shown to users
:-)

> Index: subversion/libsvn_fs_fs/fs_fs.c
> Index: subversion/libsvn_fs_base/revs-txns.c
> Index: subversion/include/svn_fs.h
> Index: subversion/tests/libsvn_fs/fs-test.c

Applied to trunk, unmodified, in r998880. (See commits@ for some other
revisions today.)

Thanks!

Daniel
Received on 2010-09-20 12:40:47 CEST

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.