Fossil SCM

Integrate svn-import_no-svn-rev branch..

mgagnon 2015-02-25 13:52 svn-import merge
Commit 16923b5c599218bf2170c905c1cc5fe63981e053
1 file changed +13 -3
+13 -3
--- src/import.c
+++ src/import.c
@@ -729,10 +729,11 @@
729729
const char *zBranches; /* Name of branches folder in repo root */
730730
int lenBranches; /* String length of zBranches */
731731
const char *zTags; /* Name of tags folder in repo root */
732732
int lenTags; /* String length of zTags */
733733
Bag newBranches; /* Branches that were created in this revision */
734
+ int noSvnRevFlag; /* Omit snv-rev-nn tags on every checkins */
734735
} gsvn;
735736
typedef struct {
736737
char *zKey;
737738
char *zVal;
738739
} KeyVal;
@@ -999,24 +1000,30 @@
9991000
parentBranch
10001001
);
10011002
blob_appendf(&manifest, "P %s\n", zParentUuid);
10021003
blob_appendf(&manifest, "T *branch * %F\n", zBranch);
10031004
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
+ }
10051008
blob_appendf(&manifest, "T -sym-%F *\n", zParentBranch);
10061009
fossil_free(zParentBranch);
10071010
}else{
10081011
char *zMergeUuid = rid_to_uuid(mergeRid);
10091012
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
+ }
10111016
fossil_free(zMergeUuid);
10121017
}
10131018
fossil_free(zParentUuid);
10141019
}else{
10151020
blob_appendf(&manifest, "T *branch * %F\n", zBranch);
10161021
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
+ }
10181025
}
10191026
}else if( branchType==SVN_TAG ){
10201027
char *zParentUuid = rid_to_uuid(parentRid);
10211028
blob_reset(&manifest);
10221029
blob_appendf(&manifest, "D %s\n", gsvn.zDate);
@@ -1478,10 +1485,11 @@
14781485
** --trunk FOLDER Name of trunk folder
14791486
** --branches FOLDER Name of branches folder
14801487
** --tags FOLDER Name of tags folder
14811488
** --base PATH Path to project root in repository
14821489
** --flat The whole dump is a single branch
1490
+** --no-svn-rev Omit 'snv-rev-nnn' tags on checkins
14831491
**
14841492
** The --incremental option allows an existing repository to be extended
14851493
** with new content.
14861494
**
14871495
** Options:
@@ -1499,10 +1507,12 @@
14991507
int flatFlag = find_option("flat", 0, 0)!=0;
15001508
15011509
gsvn.zTrunk = find_option("trunk", 0, 1);
15021510
gsvn.zBranches = find_option("branches", 0, 1);
15031511
gsvn.zTags = find_option("tags", 0, 1);
1512
+ gsvn.noSvnRevFlag = find_option("no-svn-rev", 0, 0)!=0;
1513
+
15041514
verify_all_options();
15051515
if( g.argc!=4 && g.argc!=5 ){
15061516
usage("FORMAT REPOSITORY-NAME");
15071517
}
15081518
if( g.argc==5 ){
15091519
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button