Module Name: src
Committed By: christos
Date: Wed Mar 27 18:15:13 UTC 2013
Modified Files:
src/external/gpl2/xcvs/dist/src: lock.c
Log Message:
Don't abort with an assertion when a directory cannot be found in a
repository. This could happen when someone copies from one directory
to another CVS files or when things get corrupted. Provide an explanatory
error message instead.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/lock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl2/xcvs/dist/src/lock.c
diff -u src/external/gpl2/xcvs/dist/src/lock.c:1.2 src/external/gpl2/xcvs/dist/src/lock.c:1.3
--- src/external/gpl2/xcvs/dist/src/lock.c:1.2 Wed Apr 8 12:27:51 2009
+++ src/external/gpl2/xcvs/dist/src/lock.c Wed Mar 27 14:15:13 2013
@@ -230,6 +230,9 @@ lock_name (const char *repository, const
* might have symlinks present
*/
len = find_root(repository, current_parsed_root->directory);
+ if (len == -1)
+ error (1, 0, "%s not found in %s",
+ repository, current_parsed_root->directory);
assert(len != -1);
short_repos = repository + len + 1;