You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2003/11/21 01:28:09 UTC
Re: svn commit: rev 7814 - in trunk/subversion: libsvn_fs
libsvn_fs/util mod_dav_svn tests/libsvn_fs
cmpilato@tigris.org writes:
> Author: cmpilato
> Date: Wed Nov 19 23:11:45 2003
> New Revision: 7814
> Modified: trunk/subversion/tests/libsvn_fs/fs-test.c
> ==============================================================================
> --- trunk/subversion/tests/libsvn_fs/fs-test.c (original)
> +++ trunk/subversion/tests/libsvn_fs/fs-test.c Wed Nov 19 23:11:45 2003
> @@ -1355,6 +1355,27 @@
> }
> }
>
> + /* Test that aborting a txn that's already committed fails. */
> + {
> + svn_fs_txn_t *txn4;
> + const char *txn4_name;
> + svn_revnum_t new_rev;
> + const char *conflict;
> + svn_error_t *err;
> +
> + SVN_ERR (svn_fs_begin_txn (&txn4, fs, 0, pool));
> + SVN_ERR (svn_fs_txn_name (&txn4_name, txn4, pool));
> + SVN_ERR (svn_fs_commit_txn (&conflict, &new_rev, txn4, pool));
> + err = svn_fs_abort_txn (txn4, pool);
> + if (! err)
> + return svn_error_create
> + (SVN_ERR_FS_GENERAL, NULL,
> + "expected error trying to abort a committed txn; got none");
> + else if (err->apr_err != SVN_ERR_FS_TRANSACTION_NOT_MUTABLE)
> + return svn_error_create
> + (SVN_ERR_FS_GENERAL, NULL,
> + "got an unexpected error trying to abort a committed txn");
> + }
> return SVN_NO_ERROR;
All three return paths fail to clear or return err.
> }
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 7814 - in trunk/subversion: libsvn_fs libsvn_fs/util
mod_dav_svn tests/libsvn_fs
Posted by Branko Čibej <br...@xbc.nu>.
Branko Čibej wrote:
>>ll, that just goes to show -- coding while watching the extended
>>edition of The Two Towers just doesn't pay off. :-(
>>
>>Will fix...
>>
>>
>>
>>
>While you're there, wrap 'err' in the second SVN_FS_GENERAL, so that
>testers will know _which_ unexpected error you got.
>
>
Whups, sorry now I see you already have.
'Take 50 lines: "Read the svn@ list before commenting on yesterday's
commits!?'
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 7814 - in trunk/subversion: libsvn_fs libsvn_fs/util
mod_dav_svn tests/libsvn_fs
Posted by Branko Čibej <br...@xbc.nu>.
C. Michael Pilato wrote:
>Philip Martin <ph...@codematters.co.uk> writes:
>
>
>
>>>+ err = svn_fs_abort_txn (txn4, pool);
>>>+ if (! err)
>>>+ return svn_error_create
>>>+ (SVN_ERR_FS_GENERAL, NULL,
>>>+ "expected error trying to abort a committed txn; got none");
>>>+ else if (err->apr_err != SVN_ERR_FS_TRANSACTION_NOT_MUTABLE)
>>>+ return svn_error_create
>>>+ (SVN_ERR_FS_GENERAL, NULL,
>>>+ "got an unexpected error trying to abort a committed txn");
>>>+ }
>>> return SVN_NO_ERROR;
>>>
>>>
>>All three return paths fail to clear or return err.
>>
>>
>
>Well, that just goes to show -- coding while watching the extended
>edition of The Two Towers just doesn't pay off. :-(
>
>Will fix...
>
>
While you're there, wrap 'err' in the second SVN_FS_GENERAL, so that
testers will know _which_ unexpected error you got.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 7814 - in trunk/subversion: libsvn_fs libsvn_fs/util mod_dav_svn tests/libsvn_fs
Posted by "C. Michael Pilato" <cm...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> > + err = svn_fs_abort_txn (txn4, pool);
> > + if (! err)
> > + return svn_error_create
> > + (SVN_ERR_FS_GENERAL, NULL,
> > + "expected error trying to abort a committed txn; got none");
> > + else if (err->apr_err != SVN_ERR_FS_TRANSACTION_NOT_MUTABLE)
> > + return svn_error_create
> > + (SVN_ERR_FS_GENERAL, NULL,
> > + "got an unexpected error trying to abort a committed txn");
> > + }
> > return SVN_NO_ERROR;
>
> All three return paths fail to clear or return err.
Well, that just goes to show -- coding while watching the extended
edition of The Two Towers just doesn't pay off. :-(
Will fix...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org