@@ -119,6 +119,8 @@ class FastImportRepository : public Repository
119
119
int outstandingTransactions;
120
120
QByteArray deletedBranches;
121
121
QByteArray resetBranches;
122
+ QSet<QString> deletedBranchNames;
123
+ QSet<QString> resetBranchNames;
122
124
123
125
/* Optional filter to fix up log messages */
124
126
QProcess filterMsg;
@@ -614,10 +616,13 @@ int FastImportRepository::resetBranch(const QString &branch, int revnum, mark_t
614
616
" progress SVN r" + QByteArray::number (revnum)
615
617
+ " branch " + branch.toUtf8 () + " = :" + QByteArray::number (mark)
616
618
+ " # " + comment + " \n\n " ;
617
- if (comment == " delete" )
619
+ if (comment == " delete" ) {
618
620
deletedBranches.append (backupCmd).append (cmd);
619
- else
621
+ deletedBranchNames.insert (branchRef);
622
+ } else {
620
623
resetBranches.append (backupCmd).append (cmd);
624
+ resetBranchNames.insert (branchRef);
625
+ }
621
626
622
627
return EXIT_SUCCESS;
623
628
}
@@ -632,6 +637,18 @@ void FastImportRepository::commit()
632
637
fastImport.write (resetBranches);
633
638
deletedBranches.clear ();
634
639
resetBranches.clear ();
640
+ QSet<QString>::ConstIterator it = deletedBranchNames.constBegin ();
641
+ for ( ; it != deletedBranchNames.constEnd (); ++it) {
642
+ QString tagName = *it;
643
+ if (resetBranchNames.contains (tagName))
644
+ continue ;
645
+ if (tagName.startsWith (" refs/tags/" ))
646
+ tagName.remove (0 , 10 );
647
+ qDebug () << " Removing annotated tag" << tagName << " for" << name;
648
+ annotatedTags.remove (tagName);
649
+ }
650
+ deletedBranchNames.clear ();
651
+ resetBranchNames.clear ();
635
652
}
636
653
637
654
Repository::Transaction *FastImportRepository::newTransaction (const QString &branch, const QString &svnprefix,
0 commit comments