Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df68154

Browse files
committed
Don't ignore commits which only have directory additions.
We already weren't ignoring commits involving directory propchanges or deletions.
1 parent 8df5606 commit df68154

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/svn.cpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -636,14 +636,9 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change2_t *chang
636636
else if (is_dir) {
637637
if (change->change_kind == svn_fs_path_change_modify ||
638638
change->change_kind == svn_fs_path_change_add) {
639-
if (path_from == NULL) {
640-
// freshly added directory, or modified properties
641-
// Git doesn't handle directories, so we don't either
642-
//qDebug() << " mkdir ignored:" << key;
643-
return EXIT_SUCCESS;
639+
if (path_from != NULL) {
640+
qDebug() << " " << key << "was copied from" << path_from << "rev" << rev_from;
644641
}
645-
646-
qDebug() << " " << key << "was copied from" << path_from << "rev" << rev_from;
647642
} else if (change->change_kind == svn_fs_path_change_replace) {
648643
if (path_from == NULL)
649644
qDebug() << " " << key << "was replaced";
@@ -690,7 +685,7 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change2_t *chang
690685
if ( isHandled ) {
691686
return EXIT_SUCCESS;
692687
}
693-
if (wasDir(fs, revnum - 1, key, revpool)) {
688+
if (is_dir || wasDir(fs, revnum - 1, key, revpool)) {
694689
qDebug() << current << "was a directory; ignoring";
695690
} else if (change->change_kind == svn_fs_path_change_delete) {
696691
qDebug() << current << "is being deleted but I don't know anything about it; ignoring";
@@ -710,8 +705,8 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change2_t *ch
710705
// qDebug() << "rev" << revnum << qPrintable(current) << "matched rule:" << rule.lineNumber << "(" << rule.rx.pattern() << ")";
711706
switch (rule.action) {
712707
case Rules::Match::Ignore:
713-
//if(ruledebug)
714-
// qDebug() << " " << "ignoring.";
708+
if(ruledebug)
709+
qDebug() << "rev" << revnum << qPrintable(current) << "matched rule:" << rule.info() << " " << "ignoring.";
715710
return EXIT_SUCCESS;
716711

717712
case Rules::Match::Recurse:
@@ -934,11 +929,13 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change2_t *ch
934929
return EXIT_SUCCESS;
935930
}
936931

937-
if (ignoreSet == false) {
938-
// FIXME: isn't it a bug that this isn't done
939-
txn->deleteFile(path);
932+
if (!previous.isEmpty()) {
933+
if (ignoreSet == false) {
934+
// FIXME: isn't it a bug that this isn't done
935+
txn->deleteFile(path);
936+
}
937+
recursiveDumpDir(txn, fs_root, key, path, pool);
940938
}
941-
recursiveDumpDir(txn, fs_root, key, path, pool);
942939
}
943940

944941
return EXIT_SUCCESS;

0 commit comments

Comments
 (0)