Index: src/xfer.c ================================================================== --- src/xfer.c +++ src/xfer.c @@ -273,19 +273,15 @@ Blob *pUuid /* The UUID of the file to send */ ){ static const char *const azQuery[] = { "SELECT pid FROM plink x" " WHERE cid=%d" - " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" - " AND NOT EXISTS(SELECT 1 FROM plink y" - " WHERE y.pid=x.cid AND y.cid=x.pid)", - - "SELECT pid FROM mlink x" + " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)", + + "SELECT pid, min(mtime) FROM mlink, event ON mlink.mid=event.objid" " WHERE fid=%d" " AND NOT EXISTS(SELECT 1 FROM phantom WHERE rid=pid)" - " AND NOT EXISTS(SELECT 1 FROM mlink y" - " WHERE y.pid=x.fid AND y.fid=x.pid)" }; int i; Blob src, delta; int size = 0; int srcId = 0; @@ -303,11 +299,11 @@ if( size>=blob_size(pContent)-50 ){ size = 0; }else if( uuid_is_shunned(zUuid) ){ size = 0; }else{ - if( isPrivate ) blob_append(pXfer->pOut, "private\n", -1); + if( isPrivate ) blob_append(pXfer->pOut, "private\n", -1); blob_appendf(pXfer->pOut, "file %b %s %d\n", pUuid, zUuid, size); blob_append(pXfer->pOut, blob_buffer(&delta), size); } blob_reset(&delta); free(zUuid); @@ -1659,11 +1655,15 @@ ** to the next cycle. */ if( blob_eq(&xfer.aToken[0],"message") && xfer.nToken==2 ){ char *zMsg = blob_terminate(&xfer.aToken[1]); defossilize(zMsg); - if( zMsg ) fossil_print("\rServer says: %s\n", zMsg); + if( pushFlag && zMsg && strglob("pull only *", zMsg) ){ + pushFlag = 0; + zMsg = 0; + } + fossil_print("\rServer says: %s\n", zMsg); }else /* pragma NAME VALUE... ** ** The server can send pragmas to try to convey meta-information to