@@ -493,7 +493,11 @@ int SvnRevision::prepareTransactions()
493
493
apr_hash_t *changes;
494
494
SVN_ERR (svn_fs_paths_changed2 (&changes, fs_root, pool));
495
495
496
+ #if QT_VERSION >= 0x060000
497
+ QMultiMap<QByteArray, svn_fs_path_change2_t *> map;
498
+ #else
496
499
QMap<QByteArray, svn_fs_path_change2_t *> map;
500
+ #endif
497
501
for (apr_hash_index_t *i = apr_hash_first (pool, changes); i; i = apr_hash_next (i)) {
498
502
const void *vkey;
499
503
void *value;
@@ -513,10 +517,18 @@ int SvnRevision::prepareTransactions()
513
517
fflush (stderr);
514
518
exit (1 );
515
519
}
520
+ #if QT_VERSION >= 0x060000
521
+ map.insert (QByteArray (key), change);
522
+ #else
516
523
map.insertMulti (QByteArray (key), change);
524
+ #endif
517
525
}
518
526
527
+ #if QT_VERSION >= 0x060000
528
+ QMultiMapIterator<QByteArray, svn_fs_path_change2_t *> i (map);
529
+ #else
519
530
QMapIterator<QByteArray, svn_fs_path_change2_t *> i (map);
531
+ #endif
520
532
while (i.hasNext ()) {
521
533
i.next ();
522
534
if (exportEntry (i.key (), i.value (), changes) == EXIT_FAILURE)
@@ -991,16 +1003,28 @@ int SvnRevision::recursiveDumpDir(Repository::Transaction *txn, svn_fs_t *fs, sv
991
1003
992
1004
// While we get a hash, put it in a map for sorted lookup, so we can
993
1005
// repeat the conversions and get the same git commit hashes.
1006
+ #if QT_VERSION >= 0x060000
1007
+ QMultiMap<QByteArray, svn_node_kind_t > map;
1008
+ #else
994
1009
QMap<QByteArray, svn_node_kind_t > map;
1010
+ #endif
995
1011
for (apr_hash_index_t *i = apr_hash_first (pool, entries); i; i = apr_hash_next (i)) {
996
1012
const void *vkey;
997
1013
void *value;
998
1014
apr_hash_this (i, &vkey, NULL , &value);
999
1015
svn_fs_dirent_t *dirent = reinterpret_cast <svn_fs_dirent_t *>(value);
1016
+ #if QT_VERSION >= 0x060000
1017
+ map.insert (QByteArray (dirent->name ), dirent->kind );
1018
+ #else
1000
1019
map.insertMulti (QByteArray (dirent->name ), dirent->kind );
1020
+ #endif
1001
1021
}
1002
1022
1023
+ #if QT_VERSION >= 0x060000
1024
+ QMultiMapIterator<QByteArray, svn_node_kind_t > i (map);
1025
+ #else
1003
1026
QMapIterator<QByteArray, svn_node_kind_t > i (map);
1027
+ #endif
1004
1028
while (i.hasNext ()) {
1005
1029
dirpool.clear ();
1006
1030
i.next ();
@@ -1059,17 +1083,29 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change2_t *change,
1059
1083
1060
1084
// While we get a hash, put it in a map for sorted lookup, so we can
1061
1085
// repeat the conversions and get the same git commit hashes.
1086
+ #if QT_VERSION >= 0x060000
1087
+ QMultiMap<QByteArray, svn_node_kind_t > map;
1088
+ #else
1062
1089
QMap<QByteArray, svn_node_kind_t > map;
1090
+ #endif
1063
1091
for (apr_hash_index_t *i = apr_hash_first (pool, entries); i; i = apr_hash_next (i)) {
1064
1092
dirpool.clear ();
1065
1093
const void *vkey;
1066
1094
void *value;
1067
1095
apr_hash_this (i, &vkey, NULL , &value);
1068
1096
svn_fs_dirent_t *dirent = reinterpret_cast <svn_fs_dirent_t *>(value);
1097
+ #if QT_VERSION >= 0x060000
1098
+ map.insert (QByteArray (dirent->name ), dirent->kind );
1099
+ #else
1069
1100
map.insertMulti (QByteArray (dirent->name ), dirent->kind );
1101
+ #endif
1070
1102
}
1071
1103
1104
+ #if QT_VERSION >= 0x060000
1105
+ QMultiMapIterator<QByteArray, svn_node_kind_t > i (map);
1106
+ #else
1072
1107
QMapIterator<QByteArray, svn_node_kind_t > i (map);
1108
+ #endif
1073
1109
while (i.hasNext ()) {
1074
1110
dirpool.clear ();
1075
1111
i.next ();
@@ -1286,17 +1322,27 @@ int SvnRevision::addGitIgnoreOnBranch(apr_pool_t *pool, QString key, QString pat
1286
1322
if (svn_fs_dir_entries (&entries, fs_root, key.toStdString ().c_str (), pool) != SVN_NO_ERROR) {
1287
1323
return EXIT_FAILURE;
1288
1324
}
1289
-
1325
+ #if QT_VERSION >= 0x060000
1326
+ QMultiMap<QByteArray, svn_node_kind_t > map;
1327
+ #else
1290
1328
QMap<QByteArray, svn_node_kind_t > map;
1329
+ #endif
1291
1330
for (apr_hash_index_t *i = apr_hash_first (pool, entries); i; i = apr_hash_next (i)) {
1292
1331
const void *vkey;
1293
1332
void *value;
1294
1333
apr_hash_this (i, &vkey, NULL , &value);
1295
1334
svn_fs_dirent_t *dirent = reinterpret_cast <svn_fs_dirent_t *>(value);
1335
+ #if QT_VERSION >= 0x060000
1336
+ map.insert (QByteArray (dirent->name ), dirent->kind );
1337
+ #else
1296
1338
map.insertMulti (QByteArray (dirent->name ), dirent->kind );
1339
+ #endif
1297
1340
}
1298
-
1341
+ #if QT_VERSION >= 0x060000
1342
+ QMultiMapIterator<QByteArray, svn_node_kind_t > i (map);
1343
+ #else
1299
1344
QMapIterator<QByteArray, svn_node_kind_t > i (map);
1345
+ #endif
1300
1346
while (i.hasNext ()) {
1301
1347
i.next ();
1302
1348
QString entryName = key + " /" + i.key ();
0 commit comments