Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Enhance error handling when there is no open checkout and add comments. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | mvRmHardFix |
| Files: | files | file ages | folders |
| SHA1: |
d12fc4b148dcb42fbe79ea7115469368 |
| User & Date: | mistachkin 2015-05-26 23:28:22.803 |
Context
|
2015-05-27
| ||
| 05:39 | Avoid superfluous error messages about missing temporary tables when there are no valid files to move or remove with the --hard option. check-in: d272a35d26 user: mistachkin tags: mvRmHardFix | |
|
2015-05-26
| ||
| 23:28 | Enhance error handling when there is no open checkout and add comments. check-in: d12fc4b148 user: mistachkin tags: mvRmHardFix | |
| 22:39 | Fix typo in comment and add more tests of file name transformation methods. check-in: 9b41960e82 user: mistachkin tags: mvRmHardFix | |
Changes
Changes to src/file.c.
| ︙ | ︙ | |||
1052 1053 1054 1055 1056 1057 1058 |
Blob full;
int nFull;
char *zFull;
int (*xCmp)(const char*,const char*,int);
blob_zero(pOut);
if( !g.localOpen ){
| > > > > > > > > > > > > > > > > > > | | > | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 |
Blob full;
int nFull;
char *zFull;
int (*xCmp)(const char*,const char*,int);
blob_zero(pOut);
if( !g.localOpen ){
if( absolute && !file_is_absolute_path(zOrigName) ){
if( errFatal ){
fossil_fatal("relative to absolute needs open checkout tree: %s",
zOrigName);
}
return 0;
}else{
/*
** The original path may be relative or absolute; however, without
** an open checkout tree, the only things we can do at this point
** is return it verbatim or generate a fatal error. The caller is
** probably expecting a tree-relative path name will be returned;
** however, most places where this function is called already check
** if the local checkout tree is open, either directly or indirectly,
** which would make this situation impossible. Alternatively, they
** could check the returned path using the file_is_absolute_path()
** function.
*/
blob_appendf(pOut, "%s", zOrigName);
return 1;
}
}
file_canonical_name(g.zLocalRoot, &localRoot, 1);
nLocalRoot = blob_size(&localRoot);
zLocalRoot = blob_buffer(&localRoot);
assert( nLocalRoot>0 && zLocalRoot[nLocalRoot-1]=='/' );
file_canonical_name(zOrigName, &full, 0);
nFull = blob_size(&full);
|
| ︙ | ︙ |