summaryrefslogtreecommitdiff
path: root/vcs-svn/string_pool.c
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-26 01:51:38 -0500
committerLibravatar Jonathan Nieder <jrnieder@gmail.com>2011-05-26 02:02:44 -0500
commit9ecfa8ae4c6701cae85c4f22fdfacffe22d8a75e (patch)
tree0eb9fa67421fe2c89f1262a2c92de01f4e042729 /vcs-svn/string_pool.c
parentMerge commit 'v1.7.5' into svn-fe (diff)
parentvcs-svn: avoid using ls command twice (diff)
downloadtgif-9ecfa8ae4c6701cae85c4f22fdfacffe22d8a75e.tar.xz
Merge branch 'db/vcs-svn-incremental' into svn-fe
This teaches svn-fe to incrementally import into an existing repository (at last!) at the expense of less convenient UI. Think of it as growing pains. This opens the door to many excellent things, and it would be a bad idea to discourage people from building on it for much longer. * db/vcs-svn-incremental: vcs-svn: avoid using ls command twice vcs-svn: use mark from previous import for parent commit vcs-svn: handle filenames with dq correctly vcs-svn: quote paths correctly for ls command vcs-svn: eliminate repo_tree structure vcs-svn: add a comment before each commit vcs-svn: save marks for imported commits vcs-svn: use higher mark numbers for blobs vcs-svn: set up channel to read fast-import cat-blob response Conflicts: t/t9010-svn-fe.sh vcs-svn/fast_export.c vcs-svn/fast_export.h vcs-svn/repo_tree.c vcs-svn/svndump.c
Diffstat (limited to 'vcs-svn/string_pool.c')
-rw-r--r--vcs-svn/string_pool.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/vcs-svn/string_pool.c b/vcs-svn/string_pool.c
index 8af8d54d6e..23a9d46522 100644
--- a/vcs-svn/string_pool.c
+++ b/vcs-svn/string_pool.c
@@ -4,6 +4,7 @@
*/
#include "git-compat-util.h"
+#include "quote.h"
#include "trp.h"
#include "obj_pool.h"
#include "string_pool.h"
@@ -65,7 +66,7 @@ uint32_t pool_tok_r(char *str, const char *delim, char **saveptr)
return token ? pool_intern(token) : ~0;
}
-void pool_print_seq(uint32_t len, uint32_t *seq, char delim, FILE *stream)
+void pool_print_seq(uint32_t len, const uint32_t *seq, char delim, FILE *stream)
{
uint32_t i;
for (i = 0; i < len && ~seq[i]; i++) {
@@ -75,6 +76,16 @@ void pool_print_seq(uint32_t len, uint32_t *seq, char delim, FILE *stream)
}
}
+void pool_print_seq_q(uint32_t len, const uint32_t *seq, char delim, FILE *stream)
+{
+ uint32_t i;
+ for (i = 0; i < len && ~seq[i]; i++) {
+ quote_c_style(pool_fetch(seq[i]), NULL, stream, 1);
+ if (i < len - 1 && ~seq[i + 1])
+ fputc(delim, stream);
+ }
+}
+
uint32_t pool_tok_seq(uint32_t sz, uint32_t *seq, const char *delim, char *str)
{
char *context = NULL;