Fossil

Check-in [0edbf144]
Login

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

Overview
Comment:support copying files (no folders support yet)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | svn-import
Files: files | file ages | folders
SHA1:0edbf144f3675633d7b450c3c2ed4b1abdfe1026
User & Date: baruch 2014-10-21 15:00:47
Context
2014-10-22
11:53
Can now import full dump. Still only flat and only format 2. No tracking of file moves yet check-in: 8d2e6751 user: baruch tags: svn-import
2014-10-21
15:00
support copying files (no folders support yet) check-in: 0edbf144 user: baruch tags: svn-import
14:41
support for deleted files check-in: 33278869 user: baruch tags: svn-import
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/import.c.

866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
....
1021
1022
1023
1024
1025
1026
1027





1028
1029
1030
1031
1032
1033
1034
  if( svn_read_headers(pIn, rec)==0 ) return 0;
  svn_read_props(pIn, rec);
  blob_zero(&rec->content);
  zLen = svn_find_header(*rec, "Text-content-length");
  if( zLen ){
    nLen = atoi(zLen);
  }
  if( nLen>=0 ){
    blob_read_from_channel(&rec->content, pIn, nLen);
    if( blob_size(&rec->content)!=nLen ){
      fossil_fatal("short read: got %d of %d bytes",
        blob_size(&rec->content), nLen
      );
    }
  }
  return 1;
}

static void svn_create_manifests(){
  Blob manifest;
  Stmt qRev;
................................................................................
          srcRev = atoi(zTemp);
        }else{
          fossil_fatal("Missing copyfrom-rev");
        }
      }
      rid = content_put(&rec.content);
      if( strncmp(zAction, "add", 3)==0 ){





        db_bind_int(&insFile, ":rev", rev);
        db_bind_int(&insFile, ":rid", rid);
        db_bind_text(&insFile, ":path", zPath);
        db_bind_text(&insFile, ":perm", zPerm);
        db_step(&insFile);
        db_reset(&insFile);
      }else







<
|
|
|
|
|
<







 







>
>
>
>
>







866
867
868
869
870
871
872

873
874
875
876
877

878
879
880
881
882
883
884
....
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
  if( svn_read_headers(pIn, rec)==0 ) return 0;
  svn_read_props(pIn, rec);
  blob_zero(&rec->content);
  zLen = svn_find_header(*rec, "Text-content-length");
  if( zLen ){
    nLen = atoi(zLen);
  }

  blob_read_from_channel(&rec->content, pIn, nLen);
  if( blob_size(&rec->content)!=nLen ){
    fossil_fatal("short read: got %d of %d bytes",
      blob_size(&rec->content), nLen
    );

  }
  return 1;
}

static void svn_create_manifests(){
  Blob manifest;
  Stmt qRev;
................................................................................
          srcRev = atoi(zTemp);
        }else{
          fossil_fatal("Missing copyfrom-rev");
        }
      }
      rid = content_put(&rec.content);
      if( strncmp(zAction, "add", 3)==0 ){
        if( blob_size(&rec.content)>0 && zSrcPath!=0 ){
          rid = db_int(rid,
                       "SELECT trid FROM xfiles WHERE trev=%d AND tpath=%Q",
                       srcRev, zSrcPath);
        }
        db_bind_int(&insFile, ":rev", rev);
        db_bind_int(&insFile, ":rid", rid);
        db_bind_text(&insFile, ":path", zPath);
        db_bind_text(&insFile, ":perm", zPerm);
        db_step(&insFile);
        db_reset(&insFile);
      }else