svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
QByteArray entryName = pathname + '/' + dirent->name;
- QString entryFinalName = finalPathName + '/' + dirent->name;
+ QString entryFinalName;
+ if (finalPathName.isEmpty())
+ entryFinalName = dirent->name;
+ else
+ entryFinalName = finalPathName + '/' + dirent->name;
if (dirent->kind == svn_node_dir) {
if (recursiveDumpDir(txn, fs_root, entryName, entryFinalName, dirpool) == EXIT_FAILURE)
QHash<QString, Repository::Transaction *> transactions;
// open this revision:
- qDebug() << "Exporting revision" << revnum;
+ printf("Exporting revision %d ", revnum);
+ fflush(stdout);
svn_fs_root_t *fs_root;
SVN_ERR(svn_fs_revision_root(&fs_root, fs, revnum, pool));
void *value;
apr_hash_this(i, &vkey, NULL, &value);
const char *key = reinterpret_cast<const char *>(vkey);
+ QString current = QString::fromUtf8(key);
// was this copied from somewhere?
svn_revnum_t rev_from;
if (path_from == NULL) {
// no, it's a new directory being added
// Git doesn't handle directories, so we don't either
- qDebug() << " mkdir ignored:" << key;
+ //qDebug() << " mkdir ignored:" << key;
continue;
}
+ current += '/';
qDebug() << " " << key << "was copied from" << path_from;
}
- QString current = QString::fromUtf8(key);
- if (is_dir)
- current += '/';
-
// find the first rule that matches this pathname
MatchRuleList::ConstIterator match = findMatchRule(matchRules, revnum, current);
if (match != matchRules.constEnd()) {
}
revpool.clear();
- if (transactions.isEmpty())
+ if (transactions.isEmpty()) {
+ printf("nothing to do\n");
return EXIT_SUCCESS; // no changes?
+ }
// now create the commit
apr_hash_t *revprops;
delete txn;
}
- printf("\n");
+ printf("done\n");
return EXIT_SUCCESS;
}