From 4f5de755a7931c5e15f4e7fc3d501588aa9ff88d Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sat, 20 Nov 2010 13:25:28 -0600 Subject: vcs-svn: introduce repo_read_path to check the content at a path The repo_tree structure remembers, for each path in each revision, a mode (regular file, executable, symlink, or directory) and content (blob mark or directory structure). Maintaining a second copy of all this information when it's already in the target repository is wasteful, it does not persist between svn-fe invocations, and most importantly, there is no convenient way to transfer it from one machine to another. So it would be nice to get rid of it. As a first step, let's change the repo_tree API to match fast-import's read commands more closely. Currently to read the mode for a path, one uses repo_modify_path(path, new_mode, new_content); which changes the mode and content as a side effect. There is no function to read the content at a path; add one. Signed-off-by: Jonathan Nieder Signed-off-by: David Barr Signed-off-by: Jonathan Nieder --- vcs-svn/repo_tree.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vcs-svn/repo_tree.h') diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index 68baeb582f..3202bbeffe 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/repo_tree.h @@ -15,6 +15,7 @@ uint32_t next_blob_mark(void); uint32_t repo_copy(uint32_t revision, uint32_t *src, uint32_t *dst); void repo_add(uint32_t *path, uint32_t mode, uint32_t blob_mark); uint32_t repo_modify_path(uint32_t *path, uint32_t mode, uint32_t blob_mark); +uint32_t repo_read_path(const uint32_t *path); void repo_delete(uint32_t *path); void repo_commit(uint32_t revision, uint32_t author, char *log, uint32_t uuid, uint32_t url, long unsigned timestamp); -- cgit v1.2.1