Fossil SCM
Integrate svn-import_no-svn-rev branch..
Commit
16923b5c599218bf2170c905c1cc5fe63981e053
Parent
998ba3ada4ac2a7…
1 file changed
+13
-3
+13
-3
| --- 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); |
| @@ -1478,10 +1485,11 @@ | ||
| 1478 | 1485 | ** --trunk FOLDER Name of trunk folder |
| 1479 | 1486 | ** --branches FOLDER Name of branches folder |
| 1480 | 1487 | ** --tags FOLDER Name of tags folder |
| 1481 | 1488 | ** --base PATH Path to project root in repository |
| 1482 | 1489 | ** --flat The whole dump is a single branch |
| 1490 | +** --no-svn-rev Omit 'snv-rev-nnn' tags on checkins | |
| 1483 | 1491 | ** |
| 1484 | 1492 | ** The --incremental option allows an existing repository to be extended |
| 1485 | 1493 | ** with new content. |
| 1486 | 1494 | ** |
| 1487 | 1495 | ** Options: |
| @@ -1499,10 +1507,12 @@ | ||
| 1499 | 1507 | int flatFlag = find_option("flat", 0, 0)!=0; |
| 1500 | 1508 | |
| 1501 | 1509 | gsvn.zTrunk = find_option("trunk", 0, 1); |
| 1502 | 1510 | gsvn.zBranches = find_option("branches", 0, 1); |
| 1503 | 1511 | gsvn.zTags = find_option("tags", 0, 1); |
| 1512 | + gsvn.noSvnRevFlag = find_option("no-svn-rev", 0, 0)!=0; | |
| 1513 | + | |
| 1504 | 1514 | verify_all_options(); |
| 1505 | 1515 | if( g.argc!=4 && g.argc!=5 ){ |
| 1506 | 1516 | usage("FORMAT REPOSITORY-NAME"); |
| 1507 | 1517 | } |
| 1508 | 1518 | if( g.argc==5 ){ |
| 1509 | 1519 |
| --- 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); |
| @@ -1478,10 +1485,11 @@ | |
| 1478 | ** --trunk FOLDER Name of trunk folder |
| 1479 | ** --branches FOLDER Name of branches folder |
| 1480 | ** --tags FOLDER Name of tags folder |
| 1481 | ** --base PATH Path to project root in repository |
| 1482 | ** --flat The whole dump is a single branch |
| 1483 | ** |
| 1484 | ** The --incremental option allows an existing repository to be extended |
| 1485 | ** with new content. |
| 1486 | ** |
| 1487 | ** Options: |
| @@ -1499,10 +1507,12 @@ | |
| 1499 | int flatFlag = find_option("flat", 0, 0)!=0; |
| 1500 | |
| 1501 | gsvn.zTrunk = find_option("trunk", 0, 1); |
| 1502 | gsvn.zBranches = find_option("branches", 0, 1); |
| 1503 | gsvn.zTags = find_option("tags", 0, 1); |
| 1504 | verify_all_options(); |
| 1505 | if( g.argc!=4 && g.argc!=5 ){ |
| 1506 | usage("FORMAT REPOSITORY-NAME"); |
| 1507 | } |
| 1508 | if( g.argc==5 ){ |
| 1509 |
| --- 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); |
| @@ -1478,10 +1485,11 @@ | |
| 1485 | ** --trunk FOLDER Name of trunk folder |
| 1486 | ** --branches FOLDER Name of branches folder |
| 1487 | ** --tags FOLDER Name of tags folder |
| 1488 | ** --base PATH Path to project root in repository |
| 1489 | ** --flat The whole dump is a single branch |
| 1490 | ** --no-svn-rev Omit 'snv-rev-nnn' tags on checkins |
| 1491 | ** |
| 1492 | ** The --incremental option allows an existing repository to be extended |
| 1493 | ** with new content. |
| 1494 | ** |
| 1495 | ** Options: |
| @@ -1499,10 +1507,12 @@ | |
| 1507 | int flatFlag = find_option("flat", 0, 0)!=0; |
| 1508 | |
| 1509 | gsvn.zTrunk = find_option("trunk", 0, 1); |
| 1510 | gsvn.zBranches = find_option("branches", 0, 1); |
| 1511 | gsvn.zTags = find_option("tags", 0, 1); |
| 1512 | gsvn.noSvnRevFlag = find_option("no-svn-rev", 0, 0)!=0; |
| 1513 | |
| 1514 | verify_all_options(); |
| 1515 | if( g.argc!=4 && g.argc!=5 ){ |
| 1516 | usage("FORMAT REPOSITORY-NAME"); |
| 1517 | } |
| 1518 | if( g.argc==5 ){ |
| 1519 |