Fossil

Check-in [3c24fede]
Login

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

Overview
Comment:Add the --no-svn-rev command line option to the "import svn" command that will skip the automatic tagging of every checkins with "svn-rev-nnn" tags.

Proposition for the svn-import branch..

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | svn-import_no-svn-rev
Files: files | file ages | folders
SHA1:3c24fede5ae7f6b86646cb2c084dd94c4cef3247
User & Date: mgagnon 2015-02-15 19:34:03
Context
2015-02-16
13:50
Stay in sync with svn-import... check-in: 04308c21 user: mgagnon tags: svn-import_no-svn-rev
2015-02-15
19:34
Add the --no-svn-rev command line option to the "import svn" command that will skip the automatic tagging of every checkins with "svn-rev-nnn" tags.

Proposition for the svn-import branch.. check-in: 3c24fede user: mgagnon tags: svn-import_no-svn-rev

2015-02-06
15:38
Merge trunk check-in: 1be2eb05 user: jan.nijtmans tags: svn-import
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/import.c.

   727    727     const char *zTrunk;         /* Name of trunk folder in repo root */
   728    728     int lenTrunk;               /* String length of zTrunk */
   729    729     const char *zBranches;      /* Name of branches folder in repo root */
   730    730     int lenBranches;            /* String length of zBranches */
   731    731     const char *zTags;          /* Name of tags folder in repo root */
   732    732     int lenTags;                /* String length of zTags */
   733    733     Bag newBranches;            /* Branches that were created in this revision */
          734  +  int noSvnRevFlag;           /* Omit snv-rev-nn tags on every checkins */
   734    735   } gsvn;
   735    736   typedef struct {
   736    737     char *zKey;
   737    738     char *zVal;
   738    739   } KeyVal;
   739    740   typedef struct {
   740    741     KeyVal *aHeaders;
................................................................................
   997    998               char *zParentBranch =
   998    999                 db_text(0, "SELECT tname FROM xbranches WHERE tid=%d",
   999   1000                         parentBranch
  1000   1001                 );
  1001   1002               blob_appendf(&manifest, "P %s\n", zParentUuid);
  1002   1003               blob_appendf(&manifest, "T *branch * %F\n", zBranch);
  1003   1004               blob_appendf(&manifest, "T *sym-%F *\n", zBranch);
  1004         -            blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1005  +            if( !gsvn.noSvnRevFlag ){
         1006  +              blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1007  +            }
  1005   1008               blob_appendf(&manifest, "T -sym-%F *\n", zParentBranch);
  1006   1009               fossil_free(zParentBranch);
  1007   1010             }else{
  1008   1011               char *zMergeUuid = rid_to_uuid(mergeRid);
  1009   1012               blob_appendf(&manifest, "P %s %s\n", zParentUuid, zMergeUuid);
  1010         -            blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1013  +            if( !gsvn.noSvnRevFlag ){
         1014  +              blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1015  +            }
  1011   1016               fossil_free(zMergeUuid);
  1012   1017             }
  1013   1018             fossil_free(zParentUuid);
  1014   1019           }else{
  1015   1020             blob_appendf(&manifest, "T *branch * %F\n", zBranch);
  1016   1021             blob_appendf(&manifest, "T *sym-%F *\n", zBranch);
  1017         -          blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1022  +          if( !gsvn.noSvnRevFlag ){
         1023  +            blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev);
         1024  +          }
  1018   1025           }
  1019   1026         }else if( branchType==SVN_TAG ){
  1020   1027           char *zParentUuid = rid_to_uuid(parentRid);
  1021   1028           blob_reset(&manifest);
  1022   1029           blob_appendf(&manifest, "D %s\n", gsvn.zDate);
  1023   1030           blob_appendf(&manifest, "T +sym-%F %s\n", zBranch, zParentUuid);
  1024   1031           fossil_free(zParentUuid);
................................................................................
  1472   1479   **                and tags/
  1473   1480   **                Options:
  1474   1481   **                  --trunk FOLDER     Name of trunk folder
  1475   1482   **                  --branches FOLDER  Name of branches folder
  1476   1483   **                  --tags FOLDER      Name of tags folder
  1477   1484   **                  --base PATH        Path to project root in repository
  1478   1485   **                  --flat             The whole dump is a single branch
         1486  +**                  --no-svn-rev       Omit 'snv-rev-nnn' tags on checkins
  1479   1487   **
  1480   1488   ** The --incremental option allows an existing repository to be extended
  1481   1489   ** with new content.
  1482   1490   **
  1483   1491   ** Options:
  1484   1492   **   --incremental  allow importing into an existing repository
  1485   1493   **
................................................................................
  1488   1496   void import_cmd(void){
  1489   1497     char *zPassword;
  1490   1498     FILE *pIn;
  1491   1499     Stmt q;
  1492   1500     const char *zBase = find_option("base", 0, 1);
  1493   1501     int forceFlag = find_option("force", "f", 0)!=0;
  1494   1502     int incrFlag = find_option("incremental", "i", 0)!=0;
         1503  +  int flatFlag = find_option("flat", 0, 0)!=0;
         1504  +  
  1495   1505     gsvn.zTrunk = find_option("trunk", 0, 1);
  1496   1506     gsvn.zBranches = find_option("branches", 0, 1);
  1497   1507     gsvn.zTags = find_option("tags", 0, 1);
  1498         -  int flatFlag = find_option("flat", 0, 0)!=0;
         1508  +  gsvn.noSvnRevFlag = find_option("no-svn-rev", 0, 0)!=0;
  1499   1509   
  1500   1510     verify_all_options();
  1501   1511     if( g.argc!=4  && g.argc!=5 ){
  1502   1512       usage("FORMAT REPOSITORY-NAME");
  1503   1513     }
  1504   1514     if( g.argc==5 ){
  1505   1515       pIn = fossil_fopen(g.argv[4], "rb");