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

[PATCH]: fix #661 (Bad user supplied rev # produces scary error)

From: David Kimdon <dwhedon_at_debian.org>
Date: 2002-05-01 07:57:32 CEST

Hi,

This patch fixes the spooky error message of issue #661.

before:
$ svn merge file:///var/svn -r 400:500

subversion/libsvn_fs/err.c:96
svn_error: #21055 : <Filesystem is corrupt>
  reference to non-existent revision `400' in filesystem `/var/svn/db'
$

after:
$ svn merge file:///var/svn -r 400:500

subversion/libsvn_fs/err.c:158
svn_error: #21057 : <Invalid filesystem revision number>
  reference to non-existent revision `400' in filesystem `/var/svn/db'
$

-David

    Fix issue #661:

    * subversion/libsvn_fs/err.c (svn_fs__err_dangling_rev): When a
    non-existent revision is referenced pass back the 'Invalid filesystem
    revision number' error structure rather than the 'Filesystem is corrupt'
    error structure.

Index: subversion/libsvn_fs/err.c
===================================================================
--- subversion/libsvn_fs/err.c
+++ subversion/libsvn_fs/err.c Thu Apr 25 22:28:40 2002
@@ -154,9 +154,11 @@
 svn_error_t *
 svn_fs__err_dangling_rev (svn_fs_t *fs, svn_revnum_t rev)
 {
- return
- corrupt_rev ("reference to non-existent revision `%lu' in filesystem `%s'",
- rev, fs);
+ return
+ svn_error_createf
+ (SVN_ERR_FS_NO_SUCH_REVISION, 0, 0, fs->pool,
+ "reference to non-existent revision `%lu' in filesystem `%s'",
+ (unsigned long) rev, fs->path);
 }
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 1 08:00:22 2002

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.