Differences From:
File
src/manifest.c
part of check-in
[c8da83ca36]
- Allow manifests with zero files. This fixes a problem in which some
files do not appear in the filename table.
by
drh on
2008-02-04 17:34:14.
[view]
To:
File
src/manifest.c
part of check-in
[33c31f73cd]
- Record whether or not files have their execute permission bit set.
Set or clear the execute permission bit upon checkout.
by
drh on
2008-02-21 14:27:34.
Also file
src/manifest.c
part of check-in
[588bb7cd73]
- Merged to ed26056bb5.
by
aku on
2008-02-24 18:50:35.
[view]
@@ -66,8 +66,9 @@
int nFileAlloc; /* Slots allocated in aFile[] */
struct {
char *zName; /* Name of a file */
char *zUuid; /* UUID of the file */
+ char *zPerm; /* File permissions */
} *aFile;
int nParent; /* Number of parents */
int nParentAlloc; /* Slots allocated in azParent[] */
char **azParent; /* UUIDs of parents */
@@ -156,8 +157,9 @@
pContent = &p->content;
blob_zero(&a1);
blob_zero(&a2);
+ blob_zero(&a3);
md5sum_init();
while( blob_line(pContent, &line) ){
char *z = blob_buffer(&line);
lineNo++;
@@ -276,22 +278,23 @@
break;
}
/*
- ** F <filename> <uuid>
+ ** F <filename> <uuid> ?<permissions>?
**
** Identifies a file in a manifest. Multiple F lines are
** allowed in a manifest. F lines are not allowed in any
** other control file. The filename is fossil-encoded.
*/
case 'F': {
- char *zName, *zUuid;
+ char *zName, *zUuid, *zPerm;
md5sum_step_text(blob_buffer(&line), blob_size(&line));
if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error;
- if( blob_token(&line, &a3)!=0 ) goto manifest_syntax_error;
zName = blob_terminate(&a1);
zUuid = blob_terminate(&a2);
+ blob_token(&line, &a3);
+ zPerm = blob_terminate(&a3);
if( blob_size(&a2)!=UUID_SIZE ) goto manifest_syntax_error;
if( !validate16(zUuid, UUID_SIZE) ) goto manifest_syntax_error;
defossilize(zName);
if( !file_is_simple_pathname(zName) ){
@@ -304,8 +307,9 @@
}
i = p->nFile++;
p->aFile[i].zName = zName;
p->aFile[i].zUuid = zUuid;
+ p->aFile[i].zPerm = zPerm;
if( i>0 && strcmp(p->aFile[i-1].zName, zName)>=0 ){
goto manifest_syntax_error;
}
break;