Re: [PATCH 11/15] vcs-svn: More dump format sanity checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:

> --- a/vcs-svn/svndump.c
> +++ b/vcs-svn/svndump.c
> @@ -181,12 +181,22 @@ static void handle_node(void)
[...]
> +		if (mode == REPO_MODE_DIR && type != REPO_MODE_DIR)
> +			die("invalid dump: cannot modify a directory into a file");

This is tripping for me in a revision like so:

 Revision-number: 692
 Prop-content-length: 110
 Content-length: 110

 [revprops snipped]

 Node-path: lxanew/DCNsnetwork.cpp
 Node-kind: file
 Node-action: add
 Node-copyfrom-rev: 691
 Node-copyfrom-path: DCNsnetwork.cpp


 Node-path: DCNsnetwork.cpp
 Node-action: delete

The import up to and including rev 691 works fine.  Rev 691:

 Revision-number: 691
 Prop-content-length: 110
 Content-length: 110

[props snipped]

 Node-path: lxanew/CorpusWordCollection.cpp
 Node-kind: file
 Node-action: add
 Node-copyfrom-rev: 690
 Node-copyfrom-path: CorpusWordCollection.cpp


 Node-path: CorpusWordCollection.cpp
 Node-action: delete

Pretty similar, right?  In the target repository:

 $ git ls-tree HEAD -- DCNsnetwork.cpp
 100644 blob f92d77cc88cc50e9ca333604d22db83f0668828a    DCNsnetwork.cpp

DCNsnetwork.cpp was added in r688, which looks like so:

 Revision-number: 688
 Prop-content-length: 186
 Content-length: 186

[props and many new files snipped]

 Node-path: DCNsnetwork.cpp
 Node-kind: file
 Node-action: add
 Prop-delta: true
 Prop-content-length: 10
 Text-delta: true
 Text-content-length: 2999
 Text-content-md5: 48fd4d31d16f90ab449b4d223fc3d7f8
 Content-length: 3009

 PROPS-END
 SVN^@^@^@<97>)^C<97>)<80><97>)// snetwork.cpp: implementation of the snetwork class.
 [...]

So apparently repo_add failed.  Hints?

Here's an unrelated simplification, noticed while debugging.

Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index d0d3de6..d1ec9a5 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -219,6 +219,7 @@ static void handle_node(void)
 			die("invalid dump: adds node without text");
 		repo_add(node_ctx.dst, type, mark);
 		old_mark = 0;
+		node_ctx.type = type;
 	} else {
 		die("invalid dump: Node-path block lacks Node-action");
 	}
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]