Commits

Martin Scharrer committed 5754c55

Added is_xxx methods to idently record type.

Comments (0)

Files changed (2)

architecture/svn_dumpfile_classes.mm

 <map version="0.9.0">
 <!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
-<node COLOR="#000000" CREATED="1385593102591" ID="ID_250826231" MODIFIED="1385595239940" TEXT="SVN Dumpfile Classes">
+<node COLOR="#000000" CREATED="1385593102591" ID="ID_250826231" MODIFIED="1386532663828" TEXT="SVN Dumpfile Classes">
 <font NAME="SansSerif" SIZE="20"/>
 <hook NAME="accessories/plugins/AutomaticLayout.properties"/>
 <node COLOR="#0033ff" CREATED="1385593127512" FOLDED="true" ID="ID_151109186" MODIFIED="1385921636431" POSITION="left" TEXT="Record">
 <font BOLD="true" NAME="SansSerif" SIZE="16"/>
 </node>
 </node>
-<node COLOR="#0033ff" CREATED="1385593448478" FOLDED="true" ID="ID_371937033" MODIFIED="1386280367783" POSITION="right" TEXT="Dumpfile">
+<node COLOR="#0033ff" CREATED="1385593448478" FOLDED="true" ID="ID_371937033" MODIFIED="1386532662361" POSITION="right" TEXT="Dumpfile">
 <edge STYLE="sharp_bezier" WIDTH="8"/>
 <font NAME="SansSerif" SIZE="18"/>
 <node COLOR="#00b439" CREATED="1385593463870" ID="ID_371185086" MODIFIED="1385598410783" TEXT="parse(cls, input, store_on_access=True)">
 <font BOLD="true" NAME="SansSerif" SIZE="16"/>
 </node>
 </node>
+<node COLOR="#0033ff" CREATED="1386532665986" ID="ID_166935782" MODIFIED="1386532676265" POSITION="left" TEXT="InDumpfile">
+<edge STYLE="sharp_bezier" WIDTH="8"/>
+<font NAME="SansSerif" SIZE="18"/>
+<node COLOR="#00b439" CREATED="1386532676660" ID="ID_1215920765" MODIFIED="1386532967394" TEXT="next_record()">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+<node COLOR="#990000" CREATED="1386533000992" ID="ID_442500714" MODIFIED="1386533011908" TEXT="returns next record of any type">
+<font NAME="SansSerif" SIZE="14"/>
+</node>
+</node>
+<node COLOR="#00b439" CREATED="1386532685958" ID="ID_606589283" MODIFIED="1386532970224" TEXT="next_revision()">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+<node COLOR="#990000" CREATED="1386533012825" ID="ID_942223091" MODIFIED="1386533120473" TEXT="returns next revision. &#xa;Skips over all non-revision records">
+<font NAME="SansSerif" SIZE="14"/>
+</node>
+</node>
+<node COLOR="#00b439" CREATED="1386532992097" ID="ID_820703765" MODIFIED="1386532997864" TEXT="next_node()">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+<node COLOR="#990000" CREATED="1386533034159" ID="ID_1787843836" MODIFIED="1386533106951" TEXT="returns next node of current revision.&#xa;Throws exception if next record is not a node record.">
+<font NAME="SansSerif" SIZE="14"/>
+</node>
+</node>
+</node>
+<node COLOR="#0033ff" CREATED="1386532746626" ID="ID_1079376173" MODIFIED="1386532748768" POSITION="left" TEXT="Filter">
+<edge STYLE="sharp_bezier" WIDTH="8"/>
+<font NAME="SansSerif" SIZE="18"/>
+<node COLOR="#00b439" CREATED="1386532749164" ID="ID_1936681435" MODIFIED="1386532759184" TEXT="__init__(infile, outfile)">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+<node COLOR="#00b439" CREATED="1386532759880" ID="ID_1185924309" MODIFIED="1386532863899" TEXT="filter_revision">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+<node COLOR="#00b439" CREATED="1386532864102" ID="ID_847444772" MODIFIED="1386532867456" TEXT="filter_node">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+<node COLOR="#00b439" CREATED="1386532868348" ID="ID_1945593844" MODIFIED="1386532871935" TEXT="filter_version">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+<node COLOR="#00b439" CREATED="1386532872325" ID="ID_592125395" MODIFIED="1386532876481" TEXT="filter_uuid">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+<node COLOR="#00b439" CREATED="1386532876874" ID="ID_1142596180" MODIFIED="1386532892760" TEXT="filter_record">
+<edge STYLE="bezier" WIDTH="thin"/>
+<font NAME="SansSerif" SIZE="16"/>
+</node>
+</node>
 </node>
 </map>

py/SvnDumpLoad/Format.py

     def recalc_headers(self):
         pass
 
+    def is_revision(self):
+        return False
+
+    def is_node(self):
+        return False
+
+    def is_version(self):
+        return False
+
+    def is_uuid(self):
+        return False
+
 
 class Properties(dict):
     """ SVN node properties """
     def create_empty(cls):
         return cls(None, None)
 
+    def is_node(self):
+        return True
+
     def set_path(self, path):
         self._headers['Node-path'] = path
 
         Record.__init__(self);
         self.set_versionnumber(versionnumber)
 
+    def is_version(self):
+        return True
+
     def set_versionnumber(self, versionnumber):
         versionnumber = int(versionnumber)
         if versionnumber > 2:
         import uuid
         return cls(uuid.uuid4())
 
+    def is_uuid(self):
+        return True
+
     def set_uuidstr(self, uuidstr):
         if (isinstance(uuidstr, UUID)):
             self._headers[ 'UUID' ] = uuidstr.get_uuidstr()
     def has_nodes(self):
         return len(self._nodes) > 0
 
+    def is_revision(self):
+        return True
+
+
 def class_of_next_record(infile):
     line = infile.readnonemptyline()
     recname = line.split(':')[0]