Skip to content

Commit 58378dc

Browse files
committed
Revert Maintain annotated tags throughout incremental runs #60
Revert MR # 60 Maintain annotated tags throughout incremental runs Due to compile error
1 parent c9e7c4a commit 58378dc

File tree

3 files changed

+1
-56
lines changed

3 files changed

+1
-56
lines changed

src/main.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ int main(int argc, char **argv)
211211
repositories.insert(rule.name, repo);
212212

213213
int repo_next = repo->setupIncremental(cutoff);
214-
repo->restoreAnnotatedTags();
215214
repo->restoreBranchNotes();
216215

217216
/*

src/repository.cpp

+1-54
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class FastImportRepository : public Repository
7878
};
7979
FastImportRepository(const Rules::Repository &rule);
8080
int setupIncremental(int &cutoff);
81-
void restoreAnnotatedTags();
8281
void restoreBranchNotes();
8382
void restoreLog();
8483
~FastImportRepository();
@@ -186,7 +185,6 @@ class ForwardingRepository : public Repository
186185
ForwardingRepository(const QString &n, Repository *r, const QString &p) : name(n), repo(r), prefix(p) {}
187186

188187
int setupIncremental(int &) { return 1; }
189-
void restoreAnnotatedTags() {}
190188
void restoreBranchNotes() {}
191189
void restoreLog() {}
192190

@@ -254,33 +252,6 @@ class ProcessCache: QLinkedList<FastImportRepository *>
254252
};
255253
static ProcessCache processCache;
256254

257-
QDataStream &operator<<(QDataStream &out, const FastImportRepository::AnnotatedTag &annotatedTag)
258-
{
259-
out << annotatedTag.supportingRef
260-
<< annotatedTag.svnprefix
261-
<< annotatedTag.author
262-
<< annotatedTag.log
263-
<< (quint64) annotatedTag.dt
264-
<< (qint64) annotatedTag.revnum;
265-
return out;
266-
}
267-
268-
QDataStream &operator>>(QDataStream &in, FastImportRepository::AnnotatedTag &annotatedTag)
269-
{
270-
quint64 dt;
271-
qint64 revnum;
272-
273-
in >> annotatedTag.supportingRef
274-
>> annotatedTag.svnprefix
275-
>> annotatedTag.author
276-
>> annotatedTag.log
277-
>> dt
278-
>> revnum;
279-
annotatedTag.dt = (uint) dt;
280-
annotatedTag.revnum = (int) revnum;
281-
return in;
282-
}
283-
284255
Repository *createRepository(const Rules::Repository &rule, const QHash<QString, Repository *> &repositories)
285256
{
286257
if (rule.forwardTo.isEmpty())
@@ -300,13 +271,6 @@ static QString marksFileName(QString name)
300271
return name;
301272
}
302273

303-
static QString annotatedTagsFileName(QString name)
304-
{
305-
name.replace('/', '_');
306-
name.prepend("annotatedTags-");
307-
return name;
308-
}
309-
310274
static QString branchNotesFileName(QString name)
311275
{
312276
name.replace('/', '_');
@@ -498,17 +462,6 @@ int FastImportRepository::setupIncremental(int &cutoff)
498462
return cutoff;
499463
}
500464

501-
void FastImportRepository::restoreAnnotatedTags()
502-
{
503-
QFile annotatedTagsFile(name + "/" + annotatedTagsFileName(name));
504-
if (!annotatedTagsFile.exists())
505-
return;
506-
annotatedTagsFile.open(QIODevice::ReadOnly);
507-
QDataStream annotatedTagsStream(&annotatedTagsFile);
508-
annotatedTagsStream >> annotatedTags;
509-
annotatedTagsFile.close();
510-
}
511-
512465
void FastImportRepository::restoreBranchNotes()
513466
{
514467
QFile branchNotesFile(name + "/" + branchNotesFileName(name));
@@ -780,13 +733,7 @@ void FastImportRepository::finalizeTags()
780733
if (annotatedTags.isEmpty())
781734
return;
782735

783-
QFile annotatedTagsFile(name + "/" + annotatedTagsFileName(name));
784-
annotatedTagsFile.open(QIODevice::WriteOnly);
785-
QDataStream annotatedTagsStream(&annotatedTagsFile);
786-
annotatedTagsStream << annotatedTags;
787-
annotatedTagsFile.close();
788-
789-
printf("Finalising annotated tags for %s...", qPrintable(name));
736+
printf("Finalising tags for %s...", qPrintable(name));
790737
startFastImport();
791738

792739
QHash<QString, AnnotatedTag>::ConstIterator it = annotatedTags.constBegin();

src/repository.h

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ class Repository
116116
const QByteArray &commit = QByteArray()) = 0;
117117
};
118118
virtual int setupIncremental(int &cutoff) = 0;
119-
virtual void restoreAnnotatedTags() = 0;
120119
virtual void restoreBranchNotes() = 0;
121120
virtual void restoreLog() = 0;
122121
virtual ~Repository() {}

0 commit comments

Comments
 (0)