summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e435811)
raw | patch | inline | side by side (parent: e435811)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Sat, 11 Dec 2010 23:08:51 +0000 (17:08 -0600) | ||
committer | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 7 Mar 2011 07:43:58 +0000 (01:43 -0600) |
Quote paths passed to fast-import so filenames with double quotes are
not misinterpreted.
One might imagine this could help with filenames with newlines, too,
but svn does not allow those.
Helped-by: David Barr <daivd.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
not misinterpreted.
One might imagine this could help with filenames with newlines, too,
but svn does not allow those.
Helped-by: David Barr <daivd.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
vcs-svn/fast_export.c | patch | blob | history |
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 4d57efabd50a428c280105bac758b2b7131c765e..9c03f3e16d0b1636cf406ff8ac80662404e8fc56 100644 (file)
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
void fast_export_delete(uint32_t depth, const uint32_t *path)
{
- putchar('D');
- putchar(' ');
- pool_print_seq(depth, path, '/', stdout);
- putchar('\n');
+ printf("D \"");
+ pool_print_seq_q(depth, path, '/', stdout);
+ printf("\"\n");
}
static void fast_export_truncate(uint32_t depth, const uint32_t *path, uint32_t mode)
fast_export_truncate(depth, path, mode);
return;
}
- printf("M %06"PRIo32" %s ", mode, dataref);
- pool_print_seq(depth, path, '/', stdout);
- putchar('\n');
+ printf("M %06"PRIo32" %s \"", mode, dataref);
+ pool_print_seq_q(depth, path, '/', stdout);
+ printf("\"\n");
}
static char gitsvnline[MAX_GITSVN_LINE_LEN];
static void ls_from_rev(uint32_t rev, uint32_t depth, const uint32_t *path)
{
/* ls :5 path/to/old/file */
- printf("ls :%"PRIu32" ", rev);
- pool_print_seq(depth, path, '/', stdout);
- putchar('\n');
+ printf("ls :%"PRIu32" \"", rev);
+ pool_print_seq_q(depth, path, '/', stdout);
+ printf("\"\n");
fflush(stdout);
}