@@ -438,15 +438,23 @@ void SvnRevision::splitPathName(const Rules::Match &rule, const QString &pathNam
438
438
439
439
if (repository_p) {
440
440
*repository_p = svnprefix;
441
+ #if QT_VERSION >= 0x060000
442
+ *repository_p = rule.rx .replaceIn (*repository_p, rule.repository );
443
+ #else
441
444
repository_p->replace (rule.rx , rule.repository );
445
+ #endif
442
446
foreach (Rules::Match::Substitution subst, rule.repo_substs ) {
443
447
subst.apply (*repository_p);
444
448
}
445
449
}
446
450
447
451
if (effectiveRepository_p) {
448
452
*effectiveRepository_p = svnprefix;
453
+ #if QT_VERSION >= 0x060000
454
+ *effectiveRepository_p = rule.rx .replaceIn (*effectiveRepository_p, rule.repository );
455
+ #else
449
456
effectiveRepository_p->replace (rule.rx , rule.repository );
457
+ #endif
450
458
foreach (Rules::Match::Substitution subst, rule.repo_substs ) {
451
459
subst.apply (*effectiveRepository_p);
452
460
}
@@ -458,15 +466,23 @@ void SvnRevision::splitPathName(const Rules::Match &rule, const QString &pathNam
458
466
459
467
if (branch_p) {
460
468
*branch_p = svnprefix;
469
+ #if QT_VERSION >= 0x060000
470
+ *branch_p = rule.rx .replaceIn (*branch_p, rule.branch );
471
+ #else
461
472
branch_p->replace (rule.rx , rule.branch );
473
+ #endif
462
474
foreach (Rules::Match::Substitution subst, rule.branch_substs ) {
463
475
subst.apply (*branch_p);
464
476
}
465
477
}
466
478
467
479
if (path_p) {
468
480
QString prefix = svnprefix;
481
+ #if QT_VERSION >= 0x060000
482
+ prefix = rule.rx .replaceIn (prefix, rule.prefix );
483
+ #else
469
484
prefix.replace (rule.rx , rule.prefix );
485
+ #endif
470
486
*path_p = prefix + pathName.mid (svnprefix.length ());
471
487
}
472
488
}
@@ -1308,7 +1324,11 @@ int SvnRevision::fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char
1308
1324
// they didn't match anything in Subversion but would in Git eventually
1309
1325
ignore->remove (QRegExp (" ^[^\\ r\\ n]*[\\\\ /][^\\ r\\ n]*(?:[\\ r\\ n]|$)|[\\ r\\ n][^\\ r\\ n]*[\\\\ /][^\\ r\\ n]*(?=[\\ r\\ n]|$)" ));
1310
1326
// add a slash in front to have the same meaning in Git of only working on the direct children
1327
+ #if QT_VERSION >= 0x060000
1328
+ *ignore = QRegExp (" (^|[\\ r\\ n])\\ s*(?![\\ r\\ n]|$)" ).replaceIn (*ignore, " \\ 1/" );
1329
+ #else
1311
1330
ignore->replace (QRegExp (" (^|[\\ r\\ n])\\ s*(?![\\ r\\ n]|$)" ), " \\ 1/" );
1331
+ #endif
1312
1332
if (ignore->trimmed ().isEmpty ()) {
1313
1333
*ignore = QString ();
1314
1334
}
@@ -1330,7 +1350,11 @@ int SvnRevision::fetchIgnoreProps(QString *ignore, apr_pool_t *pool, const char
1330
1350
}
1331
1351
1332
1352
// replace multiple asterisks Subversion meaning by Git meaning
1353
+ #if QT_VERSION >= 0x060000
1354
+ *ignore = QRegExp (" \\ *+" ).replaceIn (*ignore, " *" );
1355
+ #else
1333
1356
ignore->replace (QRegExp (" \\ *+" ), " *" );
1357
+ #endif
1334
1358
1335
1359
return EXIT_SUCCESS;
1336
1360
}
0 commit comments