| ︙ | | | ︙ | |
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
|
** tag to the new commit. However, if there are multiple instances
** of pattern B with the same TAGNAME, then only put the tag on the
** last commit that holds that tag.
**
** None of the above is explained in the git-fast-export
** documentation. We had to figure it out via trial and error.
*/
for(i=5; i<strlen(zRefName) && zRefName[i]!='/'; i++){}
gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* pattern B */
if( zRefName[i+1]!=0 ) zRefName += i+1;
if( fossil_strcmp(zRefName, "master")==0 ) zRefName = ggit.zMasterName;
gg.zBranch = fossil_strdup(zRefName);
gg.fromLoaded = 0;
}else
if( strncmp(zLine, "tag ", 4)==0 ){
|
|
|
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
|
** tag to the new commit. However, if there are multiple instances
** of pattern B with the same TAGNAME, then only put the tag on the
** last commit that holds that tag.
**
** None of the above is explained in the git-fast-export
** documentation. We had to figure it out via trial and error.
*/
for(i=5; i<(int)strlen(zRefName) && zRefName[i]!='/'; i++){}
gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* pattern B */
if( zRefName[i+1]!=0 ) zRefName += i+1;
if( fossil_strcmp(zRefName, "master")==0 ) zRefName = ggit.zMasterName;
gg.zBranch = fossil_strdup(zRefName);
gg.fromLoaded = 0;
}else
if( strncmp(zLine, "tag ", 4)==0 ){
|
| ︙ | | | ︙ | |
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
|
i = 0;
mx = gg.nFile;
nFrom = strlen(zFrom);
while( (pFile = import_find_file(zFrom, &i, mx))!=0 ){
if( pFile->isFrom==0 ) continue;
pNew = import_add_file();
pFile = &gg.aFile[i-1];
if( strlen(pFile->zName)>nFrom ){
pNew->zName = mprintf("%s%s", zTo, pFile->zName+nFrom);
}else{
pNew->zName = fossil_strdup(zTo);
}
pNew->isExe = pFile->isExe;
pNew->isLink = pFile->isLink;
pNew->zUuid = fossil_strdup(pFile->zUuid);
|
|
|
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
|
i = 0;
mx = gg.nFile;
nFrom = strlen(zFrom);
while( (pFile = import_find_file(zFrom, &i, mx))!=0 ){
if( pFile->isFrom==0 ) continue;
pNew = import_add_file();
pFile = &gg.aFile[i-1];
if( (int)strlen(pFile->zName)>nFrom ){
pNew->zName = mprintf("%s%s", zTo, pFile->zName+nFrom);
}else{
pNew->zName = fossil_strdup(zTo);
}
pNew->isExe = pFile->isExe;
pNew->isLink = pFile->isLink;
pNew->zUuid = fossil_strdup(pFile->zUuid);
|
| ︙ | | | ︙ | |
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
zTo = rest_of_line(&z);
i = 0;
nFrom = strlen(zFrom);
while( (pFile = import_find_file(zFrom, &i, gg.nFile))!=0 ){
if( pFile->isFrom==0 ) continue;
pNew = import_add_file();
pFile = &gg.aFile[i-1];
if( strlen(pFile->zName)>nFrom ){
pNew->zName = mprintf("%s%s", zTo, pFile->zName+nFrom);
}else{
pNew->zName = fossil_strdup(zTo);
}
pNew->zPrior = pFile->zName;
pNew->isExe = pFile->isExe;
pNew->isLink = pFile->isLink;
|
|
|
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
zTo = rest_of_line(&z);
i = 0;
nFrom = strlen(zFrom);
while( (pFile = import_find_file(zFrom, &i, gg.nFile))!=0 ){
if( pFile->isFrom==0 ) continue;
pNew = import_add_file();
pFile = &gg.aFile[i-1];
if( (int)strlen(pFile->zName)>nFrom ){
pNew->zName = mprintf("%s%s", zTo, pFile->zName+nFrom);
}else{
pNew->zName = fossil_strdup(zTo);
}
pNew->zPrior = pFile->zName;
pNew->isExe = pFile->isExe;
pNew->isLink = pFile->isLink;
|
| ︙ | | | ︙ | |
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
|
svn_read_props(pIn, rec);
blob_zero(&rec->content);
zLen = svn_find_header(*rec, "Text-content-length");
if( zLen ){
rec->contentFlag = 1;
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
);
}
}else{
rec->contentFlag = 0;
}
|
|
|
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
|
svn_read_props(pIn, rec);
blob_zero(&rec->content);
zLen = svn_find_header(*rec, "Text-content-length");
if( zLen ){
rec->contentFlag = 1;
nLen = atoi(zLen);
blob_read_from_channel(&rec->content, pIn, nLen);
if( (int)blob_size(&rec->content)!=nLen ){
fossil_fatal("short read: got %d of %d bytes",
blob_size(&rec->content), nLen
);
}
}else{
rec->contentFlag = 0;
}
|
| ︙ | | | ︙ | |
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
|
char *zBranch = 0;
int branchId = 0;
if( gsvn.azIgnTree ){
const char **pzIgnTree;
unsigned nPath = strlen(zPath);
for( pzIgnTree = gsvn.azIgnTree; *pzIgnTree; ++pzIgnTree ){
const char *zIgn = *pzIgnTree;
int nIgn = strlen(zIgn);
if( strncmp(zPath, zIgn, nIgn) == 0
&& ( nPath == nIgn || (nPath > nIgn && zPath[nIgn] == '/')) ){
return 0;
}
}
}
*type = SVN_UNKNOWN;
|
|
|
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
|
char *zBranch = 0;
int branchId = 0;
if( gsvn.azIgnTree ){
const char **pzIgnTree;
unsigned nPath = strlen(zPath);
for( pzIgnTree = gsvn.azIgnTree; *pzIgnTree; ++pzIgnTree ){
const char *zIgn = *pzIgnTree;
unsigned nIgn = strlen(zIgn);
if( strncmp(zPath, zIgn, nIgn) == 0
&& ( nPath == nIgn || (nPath > nIgn && zPath[nIgn] == '/')) ){
return 0;
}
}
}
*type = SVN_UNKNOWN;
|
| ︙ | | | ︙ | |