summaryrefslogtreecommitdiff
path: root/fastimport
diff options
context:
space:
mode:
authormasklinn <github.com@masklinn.net>2014-03-10 16:00:23 +0100
committermasklinn <github.com@masklinn.net>2014-03-10 16:00:23 +0100
commitf258de49c1a6080c1f1209e28ce9d08c77749982 (patch)
tree73364ef7ee9f27e1705985aefadbfb5302b7ff2b /fastimport
parent203d9c4f930f841bd06f7830874aa96d748eeebb (diff)
downloadpython-fastimport-git-f258de49c1a6080c1f1209e28ce9d08c77749982.tar.gz
Add NoteModify command
No parsing support, but can at least be used to generate a note and attach it to a commit.
Diffstat (limited to 'fastimport')
-rw-r--r--fastimport/commands.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/fastimport/commands.py b/fastimport/commands.py
index 0a0fce5..43b1f8f 100644
--- a/fastimport/commands.py
+++ b/fastimport/commands.py
@@ -382,6 +382,20 @@ class FileDeleteAllCommand(FileCommand):
def __repr__(self):
return "deleteall"
+class NoteModifyCommand(FileCommand):
+
+ def __init__(self, from_, data):
+ super(NoteModifyCommand, self).__init__('notemodify')
+ self.from_ = from_
+ self.data = data
+ self._binary = ['data']
+
+ def __str__(self):
+ return "N inline :%s" % self.from_
+
+ def __repr__(self):
+ return "%s\ndata %d\n%s" % (self, len(self.data), self.data)
+
def check_path(path):
"""Check that a path is legal.