summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00e2b88)
raw | patch | inline | side by side (parent: 00e2b88)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 25 Aug 2006 02:38:13 +0000 (22:38 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 14 Jan 2007 07:15:07 +0000 (02:15 -0500) |
cvs2svn has three phases: begin_commit, middle_commit, end_commit.
The ancester is computed in the middle_commit phase. So its easier
to generate a stream if the from command appears after the commit
message itself but before the file change commands.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
The ancester is computed in the middle_commit phase. So its easier
to generate a stream if the from command appears after the commit
message itself but before the file change commands.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index 3e527edf70d3788b76d1d467913240921426cd28..1842d0738bda3d7f368958a411427215035e24e6 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
file_content ::= data;
new_commit ::= 'commit' sp ref_str lf
- ('from' sp (ref_str | hexsha1 | sha1exp_str | idnum) lf)?
mark?
('author' sp name '<' email '>' ts tz lf)?
'committer' sp name '<' email '>' ts tz lf
commit_msg
+ ('from' sp (ref_str | hexsha1 | sha1exp_str | idnum) lf)?
file_change*
lf;
commit_msg ::= data;
free(str_uq);
read_next_command();
- cmd_from(b);
cmd_mark();
if (!strncmp("author ", command_buf.buf, 7)) {
author = strdup(command_buf.buf);
if (!committer)
die("Expected committer but didn't get one");
msg = cmd_data(&msglen);
+ read_next_command();
+ cmd_from(b);
/* ensure the branch is active/loaded */
if (!b->branch_tree.tree || !max_active_branches) {
/* file_change* */
for (;;) {
- read_next_command();
if (1 == command_buf.len)
break;
else if (!strncmp("M ", command_buf.buf, 2))
file_change_d(b);
else
die("Unsupported file_change: %s", command_buf.buf);
+ read_next_command();
}
/* build the tree and the commit */