From: Ramkumar Ramachandra <artagnon@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Cc: David Michael Barr <david.barr@cordelta.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Daniel Shahaf <daniel@shahaf.name>
Subject: [WIP PATCH 4/7] Replace deprecated svn_path_join
Date: Wed, 23 Jun 2010 18:22:17 +0200 [thread overview]
Message-ID: <1277310140-16891-5-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1277310140-16891-1-git-send-email-artagnon@gmail.com>
Strip the deprecated svn_path_join API, using svn_path_compose
instead. Re-add -Werror to the Makefile.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
Makefile | 2 +-
dump_editor.c | 21 ++++++++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 269c406..cf7fef7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
svnclient_ra: *.c *.h
- $(CC) -Wall -ggdb3 -O0 -o $@ svnclient_ra.c debug_editor.c dump_editor.c -lsvn_client-1 -I. -I/usr/local/include/subversion-1 -I/usr/include/apr-1.0
+ $(CC) -Wall -Werror -ggdb3 -O0 -o $@ svnclient_ra.c debug_editor.c dump_editor.c -lsvn_client-1 -I. -I/usr/local/include/subversion-1 -I/usr/include/apr-1.0
clean:
$(RM) svnclient_ra
diff --git a/dump_editor.c b/dump_editor.c
index ba0630f..00c838a 100644
--- a/dump_editor.c
+++ b/dump_editor.c
@@ -80,14 +80,17 @@ struct dir_baton *make_dir_baton(const char *path,
struct dir_baton *pb = parent_dir_baton;
struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
const char *full_path;
-
+ apr_array_header_t *compose_path = apr_array_make(pool, 2, sizeof(const char *));
/* A path relative to nothing? I don't think so. */
SVN_ERR_ASSERT_NO_RETURN(!path || pb);
/* Construct the full path of this node. */
- if (pb)
- full_path = svn_path_join("/", path, pool);
+ if (pb) {
+ APR_ARRAY_PUSH(compose_path, const char *) = "/";
+ APR_ARRAY_PUSH(compose_path, const char *) = path;
+ full_path = svn_path_compose(compose_path, pool);
+ }
else
full_path = apr_pstrdup(pool, "/");
@@ -332,12 +335,14 @@ svn_error_t *open_directory(const char *path,
struct dir_baton *new_db;
const char *cmp_path = NULL;
svn_revnum_t cmp_rev = SVN_INVALID_REVNUM;
+ apr_array_header_t *compose_path = apr_array_make(pool, 2, sizeof(const char *));
/* If the parent directory has explicit comparison path and rev,
record the same for this one. */
if (pb && ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev)) {
- cmp_path = svn_path_join(pb->cmp_path,
- svn_dirent_basename(path, pool), pool);
+ APR_ARRAY_PUSH(compose_path, const char *) = pb->cmp_path;
+ APR_ARRAY_PUSH(compose_path, const char *) = svn_dirent_basename(path, pool);
+ cmp_path = svn_path_compose(compose_path, pool);
cmp_rev = pb->cmp_rev;
}
@@ -424,11 +429,13 @@ svn_error_t *open_file(const char *path,
const char *cmp_path = NULL;
svn_revnum_t cmp_rev = SVN_INVALID_REVNUM;
+ apr_array_header_t *compose_path = apr_array_make(pool, 2, sizeof(const char *));
/* If the parent directory has explicit comparison path and rev,
record the same for this one. */
if (pb && ARE_VALID_COPY_ARGS(pb->cmp_path, pb->cmp_rev)) {
- cmp_path = svn_path_join(pb->cmp_path,
- svn_dirent_basename(path, pool), pool);
+ APR_ARRAY_PUSH(compose_path, const char *) = pb->cmp_path;
+ APR_ARRAY_PUSH(compose_path, const char *) = svn_dirent_basename(path, pool);
+ cmp_path = svn_path_compose(compose_path, pool);
cmp_rev = pb->cmp_rev;
}
--
1.7.1
next prev parent reply other threads:[~2010-06-23 16:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 16:22 [GSoC update] git-remote-svn: Week 8 Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 1/7] Add skeleton RA svnclient Ramkumar Ramachandra
2010-06-25 0:14 ` Jonathan Nieder
2010-06-25 9:07 ` Daniel Shahaf
2010-06-25 11:07 ` Ramkumar Ramachandra
2010-06-25 11:30 ` Daniel Shahaf
2010-06-25 15:30 ` OT: typesafe callbacks in C (Re: [WIP PATCH 1/7] Add skeleton RA svnclient) Jonathan Nieder
2010-06-25 14:45 ` [WIP PATCH 1/7] Add skeleton RA svnclient Jonathan Nieder
2010-06-25 13:34 ` Jonathan Nieder
2010-06-23 16:22 ` [WIP PATCH 2/7] Add stripped dump editor Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 3/7] Import dump_node to dump what changed and cleanup whitespace Ramkumar Ramachandra
2010-06-23 17:05 ` Ramkumar Ramachandra
2010-06-23 16:22 ` Ramkumar Ramachandra [this message]
2010-06-23 16:22 ` [WIP PATCH 5/7] Trigger dump_node in change_dir_prop Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 6/7] Add file_baton and trigger dump_node in change_file_prop Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 7/7] Dump the text delta Ramkumar Ramachandra
2010-06-23 17:18 ` [GSoC update] git-remote-svn: Week 8 Ramkumar Ramachandra
2010-06-25 0:42 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277310140-16891-5-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=daniel@shahaf.name \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).