1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
|
" AND tbranch=:branch"
);
db_prepare(&addRev,
"INSERT OR IGNORE INTO xrevisions (trev, tbranch) VALUES(:rev, :branch)"
);
db_prepare(&cpyPath,
"INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)"
" SELECT :path||substr(filename, length(:srcpath)+1), :branch, uuid, perm"
" FROM xfoci"
" WHERE checkinID=:rid"
" AND filename>:srcpath||'/'"
" AND filename<:srcpath||'0'"
);
db_prepare(&cpyRoot,
"INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)"
" SELECT :path||filename, :branch, uuid, perm"
" FROM xfoci"
" WHERE checkinID=:rid"
);
db_prepare(&revSrc,
"UPDATE xrevisions SET tparent=:parent"
" WHERE trev=:rev AND tbranch=:branch AND tparent<:parent"
);
|
|
|
|
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
|
" AND tbranch=:branch"
);
db_prepare(&addRev,
"INSERT OR IGNORE INTO xrevisions (trev, tbranch) VALUES(:rev, :branch)"
);
db_prepare(&cpyPath,
"INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)"
" SELECT :path||:sep||substr(filename, length(:srcpath)+2), :branch, uuid, perm"
" FROM xfoci"
" WHERE checkinID=:rid"
" AND filename>:srcpath||'/'"
" AND filename<:srcpath||'0'"
);
db_prepare(&cpyRoot,
"INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)"
" SELECT :path||:sep||filename, :branch, uuid, perm"
" FROM xfoci"
" WHERE checkinID=:rid"
);
db_prepare(&revSrc,
"UPDATE xrevisions SET tparent=:parent"
" WHERE trev=:rev AND tbranch=:branch AND tparent<:parent"
);
|
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
|
if( zKind==0 ){
fossil_fatal("Missing Node-kind");
}else if( strncmp(zKind, "dir", 3)==0 ){
if( zSrcPath ){
if( srcRid>0 ){
if( zSrcFile[0]==0 ){
db_bind_text(&cpyRoot, ":path", zFile);
db_bind_int(&cpyRoot, ":branch", branchId);
db_bind_int(&cpyRoot, ":rid", srcRid);
db_step(&cpyRoot);
db_reset(&cpyRoot);
}else{
db_bind_text(&cpyPath, ":path", zFile);
db_bind_int(&cpyPath, ":branch", branchId);
db_bind_text(&cpyPath, ":srcpath", zSrcFile);
db_bind_int(&cpyPath, ":rid", srcRid);
db_step(&cpyPath);
db_reset(&cpyPath);
}
}
|
>
>
>
>
>
>
>
>
>
>
|
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
|
if( zKind==0 ){
fossil_fatal("Missing Node-kind");
}else if( strncmp(zKind, "dir", 3)==0 ){
if( zSrcPath ){
if( srcRid>0 ){
if( zSrcFile[0]==0 ){
db_bind_text(&cpyRoot, ":path", zFile);
if( zFile[0]!=0 ){
db_bind_text(&cpyRoot, ":sep", "/");
}else{
db_bind_text(&cpyRoot, ":sep", "");
}
db_bind_int(&cpyRoot, ":branch", branchId);
db_bind_int(&cpyRoot, ":rid", srcRid);
db_step(&cpyRoot);
db_reset(&cpyRoot);
}else{
db_bind_text(&cpyPath, ":path", zFile);
if( zFile[0]!=0 ){
db_bind_text(&cpyPath, ":sep", "/");
}else{
db_bind_text(&cpyPath, ":sep", "");
}
db_bind_int(&cpyPath, ":branch", branchId);
db_bind_text(&cpyPath, ":srcpath", zSrcFile);
db_bind_int(&cpyPath, ":rid", srcRid);
db_step(&cpyPath);
db_reset(&cpyPath);
}
}
|