Mercurial > public > mercurial-scm > hg
comparison hgext/phabricator.py @ 43182:a66e2844b0c6
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
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Sun, 06 Oct 2019 13:50:32 +0100 |
parents | 8ff1ecfadcd1 |
children | 73d4bc60e389 |
comparison
equal
deleted
inserted
replaced
43181:5ff32fdf0b0b | 43182:a66e2844b0c6 |
---|---|
444 for chunk, _label in patch.diffui( | 444 for chunk, _label in patch.diffui( |
445 ctx.repo(), ctx.p1().node(), ctx.node(), None, opts=diffopts | 445 ctx.repo(), ctx.p1().node(), ctx.node(), None, opts=diffopts |
446 ): | 446 ): |
447 output.write(chunk) | 447 output.write(chunk) |
448 return output.getvalue() | 448 return output.getvalue() |
449 | |
450 | |
451 class DiffChangeType(object): | |
452 ADD = 1 | |
453 CHANGE = 2 | |
454 DELETE = 3 | |
455 MOVE_AWAY = 4 | |
456 COPY_AWAY = 5 | |
457 MOVE_HERE = 6 | |
458 COPY_HERE = 7 | |
459 MULTICOPY = 8 | |
460 | |
461 | |
462 class DiffFileType(object): | |
463 TEXT = 1 | |
464 IMAGE = 2 | |
465 BINARY = 3 | |
449 | 466 |
450 | 467 |
451 def creatediff(ctx): | 468 def creatediff(ctx): |
452 """create a Differential Diff""" | 469 """create a Differential Diff""" |
453 repo = ctx.repo() | 470 repo = ctx.repo() |