@@ -51,14 +51,14 @@ static struct {
5151} rev_ctx ;
5252
5353static struct {
54- uint32_t uuid , url ;
54+ uint32_t version , uuid , url ;
5555} dump_ctx ;
5656
5757static struct {
5858 uint32_t svn_log , svn_author , svn_date , svn_executable , svn_special , uuid ,
5959 revision_number , node_path , node_kind , node_action ,
6060 node_copyfrom_path , node_copyfrom_rev , text_content_length ,
61- prop_content_length , content_length ;
61+ prop_content_length , content_length , svn_fs_dump_format_version ;
6262} keys ;
6363
6464static void reset_node_ctx (char * fname )
@@ -85,6 +85,7 @@ static void reset_rev_ctx(uint32_t revision)
8585static void reset_dump_ctx (uint32_t url )
8686{
8787 dump_ctx .url = url ;
88+ dump_ctx .version = 1 ;
8889 dump_ctx .uuid = ~0 ;
8990}
9091
@@ -105,6 +106,7 @@ static void init_keys(void)
105106 keys .text_content_length = pool_intern ("Text-content-length" );
106107 keys .prop_content_length = pool_intern ("Prop-content-length" );
107108 keys .content_length = pool_intern ("Content-length" );
109+ keys .svn_fs_dump_format_version = pool_intern ("SVN-fs-dump-format-version" );
108110}
109111
110112static void read_props (void )
@@ -206,7 +208,12 @@ void svndump_read(const char *url)
206208 * val ++ = '\0' ;
207209 key = pool_intern (t );
208210
209- if (key == keys .uuid ) {
211+ if (key == keys .svn_fs_dump_format_version ) {
212+ dump_ctx .version = atoi (val );
213+ if (dump_ctx .version > 2 )
214+ die ("expected svn dump format version <= 2, found %d" ,
215+ dump_ctx .version );
216+ } else if (key == keys .uuid ) {
210217 dump_ctx .uuid = pool_intern (val );
211218 } else if (key == keys .revision_number ) {
212219 if (active_ctx == NODE_CTX )
0 commit comments