]> git.sur5r.net Git - u-boot/blobdiff - tools/patman/commit.py
Merge branch 'master' of git://git.denx.de/u-boot-x86
[u-boot] / tools / patman / commit.py
index 900cfb3a5a6c630e3894db6004b3e77a2b955fd8..3e0adb8f7e292afb8986dafc1d9d8778662855b9 100644 (file)
@@ -21,6 +21,7 @@ class Commit:
         changes: Dict containing a list of changes (single line strings).
             The dict is indexed by change version (an integer)
         cc_list: List of people to aliases/emails to cc on this commit
+        notes: List of lines in the commit (not series) notes
     """
     def __init__(self, hash):
         self.hash = hash
@@ -28,6 +29,8 @@ class Commit:
         self.tags = []
         self.changes = {}
         self.cc_list = []
+        self.signoff_set = set()
+        self.notes = []
 
     def AddChange(self, version, info):
         """Add a new change line to the change list for a version.
@@ -70,3 +73,16 @@ class Commit:
             cc_list:    List of aliases or email addresses
         """
         self.cc_list += cc_list
+
+    def CheckDuplicateSignoff(self, signoff):
+        """Check a list of signoffs we have send for this patch
+
+        Args:
+            signoff:    Signoff line
+        Returns:
+            True if this signoff is new, False if we have already seen it.
+        """
+        if signoff in self.signoff_set:
+          return False
+        self.signoff_set.add(signoff)
+        return True