aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_client/revisions.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_client/revisions.c')
-rw-r--r--subversion/libsvn_client/revisions.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/subversion/libsvn_client/revisions.c b/subversion/libsvn_client/revisions.c
index 4bfbfc3fc32a..c209c9ea385e 100644
--- a/subversion/libsvn_client/revisions.c
+++ b/subversion/libsvn_client/revisions.c
@@ -146,7 +146,14 @@ svn_client__get_revision_number(svn_revnum_t *revnum,
scratch_pool));
if (revision->kind == svn_opt_revision_previous)
- (*revnum)--;
+ {
+ if (*revnum == 0)
+ return svn_error_createf(
+ SVN_ERR_CLIENT_BAD_REVISION, NULL,
+ _("Path '%s' has no previous revision"),
+ svn_dirent_local_style(local_abspath, scratch_pool));
+ --(*revnum);
+ }
}
break;