Fossil

Check-in [65dc40a1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix bugs with filter and with add+change in same commit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | svn-import
Files: files | file ages | folders
SHA1:65dc40a1edeab13ae4f00994934f5a0a87500d38
User & Date: baruch 2014-11-03 16:05:12
Context
2014-11-04
10:36
Fix --flat option check-in: 57fa3896 user: baruch tags: svn-import
2014-11-03
16:05
Fix bugs with filter and with add+change in same commit check-in: 65dc40a1 user: baruch tags: svn-import
14:50
Fix bug when deleting whole folder check-in: 05537c6f user: baruch tags: svn-import
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/import.c.

1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
....
1328
1329
1330
1331
1332
1333
1334

1335
1336
1337
1338
1339
1340
1341
....
1433
1434
1435
1436
1437
1438
1439

1440
1441



1442
1443
1444
1445
1446
1447
1448
          fossil_fatal("Missing Node-kind");
        }
        if( strncmp(zKind, "dir", 3)==0 ) continue;
        if( deltaFlag ){
          Blob deltaSrc;
          Blob target;
          rid = db_int(0, "SELECT trid, max(trev) FROM xhist"
                          " WHERE trev<=%d AND tpath=%Q", gsvn.rev-1, zPath);
          content_get(rid, &deltaSrc);
          svn_apply_svndiff(&rec.content, &deltaSrc, &target);
          rid = content_put(&target);
        }else{
          rid = content_put(&rec.content);
        }
        db_bind_int(&addHist, ":rid", rid);
................................................................................
** See also: export
*/
void import_cmd(void){
  char *zPassword;
  FILE *pIn;
  Stmt q;
  const char *zFilter = find_option("filter", 0, 1);

  int forceFlag = find_option("force", "f", 0)!=0;
  int incrFlag = find_option("incremental", "i", 0)!=0;
  gsvn.zTrunk = find_option("trunk", 0, 1);
  gsvn.zBranches = find_option("branches", 0, 1);
  gsvn.zTags = find_option("tags", 0, 1);
  gsvn.flatFlag = find_option("flat", 0, 0)!=0;

................................................................................
      gsvn.lenBranches++;
    }
    if( gsvn.zTags[gsvn.lenTags-1]!='/' ){
      gsvn.zTags = mprintf("%s/", gsvn.zTags);
      gsvn.lenTags++;
    }
    if( zFilter==0 ){ zFilter = ""; }

    blob_zero(&gsvn.filter);
    blob_set(&gsvn.filter, zFilter);



    svn_dump_import(pIn);
  }

  verify_cancel();
  db_end_transaction(0);
  db_begin_transaction();
  fossil_print("Rebuilding repository meta-data...\n");







|







 







>







 







>


>
>
>







1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
....
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
....
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
          fossil_fatal("Missing Node-kind");
        }
        if( strncmp(zKind, "dir", 3)==0 ) continue;
        if( deltaFlag ){
          Blob deltaSrc;
          Blob target;
          rid = db_int(0, "SELECT trid, max(trev) FROM xhist"
                          " WHERE trev<=%d AND tpath=%Q", gsvn.rev, zPath);
          content_get(rid, &deltaSrc);
          svn_apply_svndiff(&rec.content, &deltaSrc, &target);
          rid = content_put(&target);
        }else{
          rid = content_put(&rec.content);
        }
        db_bind_int(&addHist, ":rid", rid);
................................................................................
** See also: export
*/
void import_cmd(void){
  char *zPassword;
  FILE *pIn;
  Stmt q;
  const char *zFilter = find_option("filter", 0, 1);
  int lenFilter;
  int forceFlag = find_option("force", "f", 0)!=0;
  int incrFlag = find_option("incremental", "i", 0)!=0;
  gsvn.zTrunk = find_option("trunk", 0, 1);
  gsvn.zBranches = find_option("branches", 0, 1);
  gsvn.zTags = find_option("tags", 0, 1);
  gsvn.flatFlag = find_option("flat", 0, 0)!=0;

................................................................................
      gsvn.lenBranches++;
    }
    if( gsvn.zTags[gsvn.lenTags-1]!='/' ){
      gsvn.zTags = mprintf("%s/", gsvn.zTags);
      gsvn.lenTags++;
    }
    if( zFilter==0 ){ zFilter = ""; }
    lenFilter = strlen(zFilter);
    blob_zero(&gsvn.filter);
    blob_set(&gsvn.filter, zFilter);
    if( lenFilter>0 && zFilter[lenFilter-1]!='/' ){
      blob_append(&gsvn.filter, "/", 1);
    }
    svn_dump_import(pIn);
  }

  verify_cancel();
  db_end_transaction(0);
  db_begin_transaction();
  fossil_print("Rebuilding repository meta-data...\n");