1. Martin Scharrer
  2. SvnDumpLoad

Commits

Martin Scharrer  committed 449bf27

Added Node parsing by Dumpfile. Fixed serious issue with Revision._nodes. Two spelling fixes.

  • Participants
  • Parent commits 1a9eac8
  • Branches default

Comments (0)

Files changed (1)

File py/SvnDumpLoad/Format.py

View file
         self._content = text_content
 
     def recalc_headers(self):
-        super(RecordWithContent, self).realc_headers()
+        super(RecordWithContent, self).recalc_headers()
         if self.has_text_content():
             self._headers['Text-content-length'] = str(len(self._content))
             self._headers['Content-length'] = str(int(self._headers['Prop-content-length']) + int(self._headers['Text-content-length']))
 
     def write(self, outfile):
         RecordWithProperties.write(self, outfile)
-        if self.has_content():
+        if self.has_text_content():
             outfile.write(self._content)
             outfile.write("\n")
 
             props.set_property('svn:author', author)
         if log is not None:
             props.set_property('svn:log', log)
-        self._nodes = nodes
+        self._nodes = list(nodes)
+
 
     @classmethod
     def create_empty(cls):
         try:
             while True:
                 try:
-                    self._revs.append( Revision.parse(infile) )
+                    rev = Revision.parse(infile)
+                    self._revs.append( rev )
+                    try:
+                        node = Node.parse(infile)
+                        rev.append_node( node )
+                    except SvnDumpfileRecordNotFound:
+                        pass
                 except SvnDumpfileRecordNotFound:
                     extraversion = Version.parse(infile, optional=True)
                     extrauuid    = UUID.parse(infile, optional=True)
         for rev in self._revs:
             rev.write(outfile)
             outfile.write("\n")
+            for node in rev.get_nodes():
+                node.write(outfile)
+                outfile.write("\n")