diff options
author | masklinn <github.com@masklinn.net> | 2014-03-10 16:00:23 +0100 |
---|---|---|
committer | masklinn <github.com@masklinn.net> | 2014-03-10 16:00:23 +0100 |
commit | f258de49c1a6080c1f1209e28ce9d08c77749982 (patch) | |
tree | 73364ef7ee9f27e1705985aefadbfb5302b7ff2b /fastimport | |
parent | 203d9c4f930f841bd06f7830874aa96d748eeebb (diff) | |
download | python-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.py | 14 |
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. |