Fossil SCM
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..
Commit
3c24fede5ae7f6b86646cb2c084dd94c4cef3247
Parent
1be2eb0535a9b8b…
1 file changed
+14
-4
+14
-4
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -729,10 +729,11 @@ | ||
| 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; |
| @@ -999,24 +1000,30 @@ | ||
| 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); |
| @@ -1474,10 +1481,11 @@ | ||
| 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: |
| @@ -1490,14 +1498,16 @@ | ||
| 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 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -729,10 +729,11 @@ | |
| 729 | const char *zBranches; /* Name of branches folder in repo root */ |
| 730 | int lenBranches; /* String length of zBranches */ |
| 731 | const char *zTags; /* Name of tags folder in repo root */ |
| 732 | int lenTags; /* String length of zTags */ |
| 733 | Bag newBranches; /* Branches that were created in this revision */ |
| 734 | } gsvn; |
| 735 | typedef struct { |
| 736 | char *zKey; |
| 737 | char *zVal; |
| 738 | } KeyVal; |
| @@ -999,24 +1000,30 @@ | |
| 999 | parentBranch |
| 1000 | ); |
| 1001 | blob_appendf(&manifest, "P %s\n", zParentUuid); |
| 1002 | blob_appendf(&manifest, "T *branch * %F\n", zBranch); |
| 1003 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 1004 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1005 | blob_appendf(&manifest, "T -sym-%F *\n", zParentBranch); |
| 1006 | fossil_free(zParentBranch); |
| 1007 | }else{ |
| 1008 | char *zMergeUuid = rid_to_uuid(mergeRid); |
| 1009 | blob_appendf(&manifest, "P %s %s\n", zParentUuid, zMergeUuid); |
| 1010 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1011 | fossil_free(zMergeUuid); |
| 1012 | } |
| 1013 | fossil_free(zParentUuid); |
| 1014 | }else{ |
| 1015 | blob_appendf(&manifest, "T *branch * %F\n", zBranch); |
| 1016 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 1017 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1018 | } |
| 1019 | }else if( branchType==SVN_TAG ){ |
| 1020 | char *zParentUuid = rid_to_uuid(parentRid); |
| 1021 | blob_reset(&manifest); |
| 1022 | blob_appendf(&manifest, "D %s\n", gsvn.zDate); |
| @@ -1474,10 +1481,11 @@ | |
| 1474 | ** --trunk FOLDER Name of trunk folder |
| 1475 | ** --branches FOLDER Name of branches folder |
| 1476 | ** --tags FOLDER Name of tags folder |
| 1477 | ** --base PATH Path to project root in repository |
| 1478 | ** --flat The whole dump is a single branch |
| 1479 | ** |
| 1480 | ** The --incremental option allows an existing repository to be extended |
| 1481 | ** with new content. |
| 1482 | ** |
| 1483 | ** Options: |
| @@ -1490,14 +1498,16 @@ | |
| 1490 | FILE *pIn; |
| 1491 | Stmt q; |
| 1492 | const char *zBase = find_option("base", 0, 1); |
| 1493 | int forceFlag = find_option("force", "f", 0)!=0; |
| 1494 | int incrFlag = find_option("incremental", "i", 0)!=0; |
| 1495 | gsvn.zTrunk = find_option("trunk", 0, 1); |
| 1496 | gsvn.zBranches = find_option("branches", 0, 1); |
| 1497 | gsvn.zTags = find_option("tags", 0, 1); |
| 1498 | int flatFlag = find_option("flat", 0, 0)!=0; |
| 1499 | |
| 1500 | verify_all_options(); |
| 1501 | if( g.argc!=4 && g.argc!=5 ){ |
| 1502 | usage("FORMAT REPOSITORY-NAME"); |
| 1503 | } |
| 1504 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -729,10 +729,11 @@ | |
| 729 | const char *zBranches; /* Name of branches folder in repo root */ |
| 730 | int lenBranches; /* String length of zBranches */ |
| 731 | const char *zTags; /* Name of tags folder in repo root */ |
| 732 | int lenTags; /* String length of zTags */ |
| 733 | Bag newBranches; /* Branches that were created in this revision */ |
| 734 | int noSvnRevFlag; /* Omit snv-rev-nn tags on every checkins */ |
| 735 | } gsvn; |
| 736 | typedef struct { |
| 737 | char *zKey; |
| 738 | char *zVal; |
| 739 | } KeyVal; |
| @@ -999,24 +1000,30 @@ | |
| 1000 | parentBranch |
| 1001 | ); |
| 1002 | blob_appendf(&manifest, "P %s\n", zParentUuid); |
| 1003 | blob_appendf(&manifest, "T *branch * %F\n", zBranch); |
| 1004 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 1005 | if( !gsvn.noSvnRevFlag ){ |
| 1006 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1007 | } |
| 1008 | blob_appendf(&manifest, "T -sym-%F *\n", zParentBranch); |
| 1009 | fossil_free(zParentBranch); |
| 1010 | }else{ |
| 1011 | char *zMergeUuid = rid_to_uuid(mergeRid); |
| 1012 | blob_appendf(&manifest, "P %s %s\n", zParentUuid, zMergeUuid); |
| 1013 | if( !gsvn.noSvnRevFlag ){ |
| 1014 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1015 | } |
| 1016 | fossil_free(zMergeUuid); |
| 1017 | } |
| 1018 | fossil_free(zParentUuid); |
| 1019 | }else{ |
| 1020 | blob_appendf(&manifest, "T *branch * %F\n", zBranch); |
| 1021 | blob_appendf(&manifest, "T *sym-%F *\n", zBranch); |
| 1022 | if( !gsvn.noSvnRevFlag ){ |
| 1023 | blob_appendf(&manifest, "T +sym-svn-rev-%d *\n", gsvn.rev); |
| 1024 | } |
| 1025 | } |
| 1026 | }else if( branchType==SVN_TAG ){ |
| 1027 | char *zParentUuid = rid_to_uuid(parentRid); |
| 1028 | blob_reset(&manifest); |
| 1029 | blob_appendf(&manifest, "D %s\n", gsvn.zDate); |
| @@ -1474,10 +1481,11 @@ | |
| 1481 | ** --trunk FOLDER Name of trunk folder |
| 1482 | ** --branches FOLDER Name of branches folder |
| 1483 | ** --tags FOLDER Name of tags folder |
| 1484 | ** --base PATH Path to project root in repository |
| 1485 | ** --flat The whole dump is a single branch |
| 1486 | ** --no-svn-rev Omit 'snv-rev-nnn' tags on checkins |
| 1487 | ** |
| 1488 | ** The --incremental option allows an existing repository to be extended |
| 1489 | ** with new content. |
| 1490 | ** |
| 1491 | ** Options: |
| @@ -1490,14 +1498,16 @@ | |
| 1498 | FILE *pIn; |
| 1499 | Stmt q; |
| 1500 | const char *zBase = find_option("base", 0, 1); |
| 1501 | int forceFlag = find_option("force", "f", 0)!=0; |
| 1502 | int incrFlag = find_option("incremental", "i", 0)!=0; |
| 1503 | int flatFlag = find_option("flat", 0, 0)!=0; |
| 1504 | |
| 1505 | gsvn.zTrunk = find_option("trunk", 0, 1); |
| 1506 | gsvn.zBranches = find_option("branches", 0, 1); |
| 1507 | gsvn.zTags = find_option("tags", 0, 1); |
| 1508 | gsvn.noSvnRevFlag = find_option("no-svn-rev", 0, 0)!=0; |
| 1509 | |
| 1510 | verify_all_options(); |
| 1511 | if( g.argc!=4 && g.argc!=5 ){ |
| 1512 | usage("FORMAT REPOSITORY-NAME"); |
| 1513 | } |
| 1514 |