author | Jonathan Nieder <jrnieder@gmail.com> | |
Thu, 26 May 2011 07:12:14 +0000 (02:12 -0500) | ||
committer | Jonathan Nieder <jrnieder@gmail.com> | |
Thu, 26 May 2011 07:12:14 +0000 (02:12 -0500) |
* db/svn-fe-code-purge:
vcs-svn: drop obj_pool
vcs-svn: drop treap
vcs-svn: drop string_pool
vcs-svn: pass paths through to fast-import
Conflicts:
vcs-svn/fast_export.c
vcs-svn/fast_export.h
vcs-svn/repo_tree.c
vcs-svn/repo_tree.h
vcs-svn/string_pool.c
vcs-svn/svndump.c
vcs-svn/trp.txt
vcs-svn: drop obj_pool
vcs-svn: drop treap
vcs-svn: drop string_pool
vcs-svn: pass paths through to fast-import
Conflicts:
vcs-svn/fast_export.c
vcs-svn/fast_export.h
vcs-svn/repo_tree.c
vcs-svn/repo_tree.h
vcs-svn/string_pool.c
vcs-svn/svndump.c
vcs-svn/trp.txt
1 | 2 | |||
---|---|---|---|---|
.gitignore | patch | | diff1 | | diff2 | | blob | history |
Makefile | patch | | diff1 | | diff2 | | blob | history |
vcs-svn/fast_export.c | patch | | diff1 | | diff2 | | blob | history |
vcs-svn/fast_export.h | patch | | diff1 | | diff2 | | blob | history |
vcs-svn/repo_tree.c | patch | | diff1 | | diff2 | | blob | history |
vcs-svn/repo_tree.h | patch | | diff1 | | diff2 | | blob | history |
vcs-svn/svndump.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc .gitignore
Simple merge
diff --cc Makefile
Simple merge
diff --cc vcs-svn/fast_export.c
Simple merge
diff --cc vcs-svn/fast_export.h
index 9c522d177d4959266ae6756546a0b30789dbc681,12b0bbb41969ea2159a79c9fe90492fb1b2435d2..2d392e370dad60b8907951b3f8509413fcc43e50
+++ b/vcs-svn/fast_export.h
void fast_export_deinit(void);
void fast_export_reset(void);
- void fast_export_delete(uint32_t depth, const uint32_t *path);
- void fast_export_modify(uint32_t depth, const uint32_t *path,
- uint32_t mode, const char *dataref);
+ void fast_export_delete(const char *path);
+ void fast_export_modify(const char *path, uint32_t mode, const char *dataref);
-void fast_export_begin_commit(uint32_t revision, const char *author, char *log,
- const char *uuid, const char *url,
- unsigned long timestamp);
+void fast_export_begin_commit(uint32_t revision, const char *author,
+ const struct strbuf *log, const char *uuid,
+ const char *url, unsigned long timestamp);
void fast_export_end_commit(uint32_t revision);
void fast_export_data(uint32_t mode, uint32_t len, struct line_buffer *input);
diff --cc vcs-svn/repo_tree.c
index 1681b654d1afa69884b695e0adc87d4031f7c230,f2466bc63412f2afc2b0ce07306ed2351d0fa749..67d27f0b6ca95ad62f95bb6c4fb38c58065dc8f0
--- 1/vcs-svn/repo_tree.c
--- 2/vcs-svn/repo_tree.c
+++ b/vcs-svn/repo_tree.c
#include "repo_tree.h"
#include "fast_export.h"
- const char *repo_read_path(const uint32_t *path, uint32_t *mode_out)
-const char *repo_read_path(const char *path)
++const char *repo_read_path(const char *path, uint32_t *mode_out)
{
int err;
- uint32_t dummy;
static struct strbuf buf = STRBUF_INIT;
strbuf_reset(&buf);
- err = fast_export_ls(REPO_MAX_PATH_DEPTH, path, mode_out, &buf);
- err = fast_export_ls(path, &dummy, &buf);
++ err = fast_export_ls(path, mode_out, &buf);
if (err) {
if (errno != ENOENT)
die_errno("BUG: unexpected fast_export_ls error");
return buf.buf;
}
- void repo_copy(uint32_t revision, const uint32_t *src, const uint32_t *dst)
-uint32_t repo_read_mode(const char *path)
-{
- int err;
- uint32_t result;
- static struct strbuf dummy = STRBUF_INIT;
-
- strbuf_reset(&dummy);
- err = fast_export_ls(path, &result, &dummy);
- if (err) {
- if (errno != ENOENT)
- die_errno("BUG: unexpected fast_export_ls error");
- /* Treat missing paths as directories. */
- return REPO_MODE_DIR;
- }
- return result;
-}
-
+ void repo_copy(uint32_t revision, const char *src, const char *dst)
{
int err;
uint32_t mode;
diff --cc vcs-svn/repo_tree.h
index ce69fa7e58536d28fd7e262562bb7de587602cdc,44e6e8fabc4c26a8bc6369d9182ff03d2219228d..889c6a3c954375ab167f8b77b9f9a64dd0ccc2aa
--- 1/vcs-svn/repo_tree.h
--- 2/vcs-svn/repo_tree.h
+++ b/vcs-svn/repo_tree.h
#define REPO_MODE_EXE 0100755
#define REPO_MODE_LNK 0120000
- #define REPO_MAX_PATH_LEN 4096
- #define REPO_MAX_PATH_DEPTH 1000
-
uint32_t next_blob_mark(void);
- void repo_copy(uint32_t revision, const uint32_t *src, const uint32_t *dst);
- void repo_add(uint32_t *path, uint32_t mode, uint32_t blob_mark);
- const char *repo_read_path(const uint32_t *path, uint32_t *mode_out);
- void repo_delete(uint32_t *path);
+ void repo_copy(uint32_t revision, const char *src, const char *dst);
+ void repo_add(const char *path, uint32_t mode, uint32_t blob_mark);
-const char *repo_read_path(const char *path);
-uint32_t repo_read_mode(const char *path);
++const char *repo_read_path(const char *path, uint32_t *mode_out);
+ void repo_delete(const char *path);
void repo_commit(uint32_t revision, const char *author,
- char *log, const char *uuid, const char *url,
+ const struct strbuf *log, const char *uuid, const char *url,
long unsigned timestamp);
void repo_diff(uint32_t r1, uint32_t r2);
void repo_init(void);
diff --cc vcs-svn/svndump.c
index 35a8af3c9f7faee7692bbebbd39308a37335ad5e,363503d4eafb9f157afbbfe0d593f1ceee8ed0c9..11c59f18bfccadbd56c7313b0eafea457f5c9f0b
--- 1/vcs-svn/svndump.c
--- 2/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
#include "repo_tree.h"
#include "fast_export.h"
#include "line_buffer.h"
- #include "string_pool.h"
#include "strbuf.h"
-#define REPORT_FILENO 3
-
/*
* Compare start of string to literal of equal length;
* must be guarded by length test.
if (have_text || have_props || node_ctx.srcRev)
die("invalid dump: deletion node has "
"copyfrom info, text, or properties");
- repo_delete(node_ctx.dst);
- return repo_delete(node_ctx.dst.buf);
++ repo_delete(node_ctx.dst.buf);
+ return;
}
if (node_ctx.action == NODEACT_REPLACE) {
- repo_delete(node_ctx.dst);
+ repo_delete(node_ctx.dst.buf);
node_ctx.action = NODEACT_ADD;
}
if (node_ctx.srcRev) {
old_data = NULL;
} else if (node_ctx.action == NODEACT_CHANGE) {
uint32_t mode;
- old_data = repo_read_path(node_ctx.dst, &mode);
- old_data = repo_read_path(node_ctx.dst.buf);
- mode = repo_read_mode(node_ctx.dst.buf);
++ old_data = repo_read_path(node_ctx.dst.buf, &mode);
if (mode == REPO_MODE_DIR && type != REPO_MODE_DIR)
die("invalid dump: cannot modify a directory into a file");
if (mode != REPO_MODE_DIR && type == REPO_MODE_DIR)