Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch fix-sync-delta-loop Excluding Merge-Ins
This is equivalent to a diff from 6fb750d77c to 6cc262207d
2012-11-17
| ||
19:16 | Fix the server-side sync operation so that it will not generate a delta loop when a file changes from its original state through two or more intermediate states and back to its original state and all versions of the file attempt to sync in a single transaction. check-in: e5b8eb1235 user: drh tags: trunk | |
19:07 | Avoid the <nobr> tag in generated HTML. check-in: 8ea929ca55 user: drh tags: trunk | |
15:03 | Only show the "pull only - not authorized to push" message once when syncing with a repo for which there is read-only permission. Leaf check-in: 6cc262207d user: drh tags: fix-sync-delta-loop | |
2012-11-16
| ||
21:57 | Provisional changes aimed at preventing delta loops on sync operations that might otherwise occur if a sequence of file changes ends with a file back to its original state after a sequence of two or more intermediate states. check-in: 141b990722 user: drh tags: fix-sync-delta-loop | |
07:50 | remove unused variable check-in: 6fb750d77c user: jan.nijtmans tags: trunk | |
2012-11-15
| ||
20:43 | The annotator follows name changes. check-in: ee33b951a4 user: drh tags: trunk | |
Changes to src/xfer.c.
271 271 int isPrivate, /* True if rid is a private artifact */ 272 272 Blob *pContent, /* The content of the file to send */ 273 273 Blob *pUuid /* The UUID of the file to send */ 274 274 ){ 275 275 static const char *const azQuery[] = { 276 276 "SELECT pid FROM plink x" 277 277 " WHERE cid=%d" 278 - " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" 279 - " AND NOT EXISTS(SELECT 1 FROM plink y" 280 - " WHERE y.pid=x.cid AND y.cid=x.pid)", 281 - 282 - "SELECT pid FROM mlink x" 278 + " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)", 279 + 280 + "SELECT pid, min(mtime) FROM mlink, event ON mlink.mid=event.objid" 283 281 " WHERE fid=%d" 284 282 " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" 285 - " AND NOT EXISTS(SELECT 1 FROM mlink y" 286 - " WHERE y.pid=x.fid AND y.fid=x.pid)" 287 283 }; 288 284 int i; 289 285 Blob src, delta; 290 286 int size = 0; 291 287 int srcId = 0; 292 288 293 289 for(i=0; srcId==0 && i<count(azQuery); i++){ ................................................................................ 301 297 blob_delta_create(&src, pContent, &delta); 302 298 size = blob_size(&delta); 303 299 if( size>=blob_size(pContent)-50 ){ 304 300 size = 0; 305 301 }else if( uuid_is_shunned(zUuid) ){ 306 302 size = 0; 307 303 }else{ 308 - if( isPrivate ) blob_append(pXfer->pOut, "private\n", -1); 304 + if( isPrivate ) blob_append(pXfer->pOut, "private\n", -1); 309 305 blob_appendf(pXfer->pOut, "file %b %s %d\n", pUuid, zUuid, size); 310 306 blob_append(pXfer->pOut, blob_buffer(&delta), size); 311 307 } 312 308 blob_reset(&delta); 313 309 free(zUuid); 314 310 blob_reset(&src); 315 311 } ................................................................................ 1657 1653 ** 1658 1654 ** If the "login failed" message is seen, clear the sync password prior 1659 1655 ** to the next cycle. 1660 1656 */ 1661 1657 if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ 1662 1658 char *zMsg = blob_terminate(&xfer.aToken[1]); 1663 1659 defossilize(zMsg); 1664 - if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); 1660 + if( pushFlag && zMsg && strglob("pull only *", zMsg) ){ 1661 + pushFlag = 0; 1662 + zMsg = 0; 1663 + } 1664 + fossil_print("\rServer says: %s\n", zMsg); 1665 1665 }else 1666 1666 1667 1667 /* pragma NAME VALUE... 1668 1668 ** 1669 1669 ** The server can send pragmas to try to convey meta-information to 1670 1670 ** the client. These are informational only. Unknown pragmas are 1671 1671 ** silently ignored.