phabricator: add the DiffChangeType and DiffFileType constants
authorIan Moody <moz-ian@perix.co.uk>
Sun, 06 Oct 2019 13:50:32 +0100
changeset 43182 a66e2844b0c6
parent 43181 5ff32fdf0b0b
child 43183 73d4bc60e389
phabricator: add the DiffChangeType and DiffFileType constants These are used in Phabricator change objects. There are more values but so far as I can tell we don't need them. Differential Revision: https://phab.mercurial-scm.org/D7041
hgext/phabricator.py
--- a/hgext/phabricator.py	Sun Oct 06 03:30:00 2019 -0400
+++ b/hgext/phabricator.py	Sun Oct 06 13:50:32 2019 +0100
@@ -448,6 +448,23 @@
     return output.getvalue()
 
 
+class DiffChangeType(object):
+    ADD = 1
+    CHANGE = 2
+    DELETE = 3
+    MOVE_AWAY = 4
+    COPY_AWAY = 5
+    MOVE_HERE = 6
+    COPY_HERE = 7
+    MULTICOPY = 8
+
+
+class DiffFileType(object):
+    TEXT = 1
+    IMAGE = 2
+    BINARY = 3
+
+
 def creatediff(ctx):
     """create a Differential Diff"""
     repo = ctx.repo()