Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix handling paths when branching to/from a subdir |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | svn-import |
| Files: | files | file ages | folders |
| SHA1: |
261ff58e2302ba295e07899b03ec9ed9 |
| User & Date: | baruch 2015-01-18 20:35:57 |
Context
|
2015-01-18
| ||
| 21:12 | Merge trunk check-in: 0746fbe416 user: baruch tags: svn-import | |
| 20:35 | Fix handling paths when branching to/from a subdir check-in: 261ff58e23 user: baruch tags: svn-import | |
| 14:10 | Much better detection of changes to tags. Prevent commit with no changes. check-in: bb020aed62 user: baruch tags: svn-import | |
Changes
Changes to src/import.c.
| ︙ | ︙ | |||
1198 1199 1200 1201 1202 1203 1204 |
" 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)"
| | | | 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);
}
}
|
| ︙ | ︙ |