##// END OF EJS Templates
phabricator: add the phabhunk data structure...
Ian Moody -
r43453:73d4bc60 default
parent child Browse files
Show More
@@ -50,6 +50,7 b' import re'
50 from mercurial.node import bin, nullid
50 from mercurial.node import bin, nullid
51 from mercurial.i18n import _
51 from mercurial.i18n import _
52 from mercurial.pycompat import getattr
52 from mercurial.pycompat import getattr
53 from mercurial.thirdparty import attr
53 from mercurial import (
54 from mercurial import (
54 cmdutil,
55 cmdutil,
55 context,
56 context,
@@ -465,6 +466,21 b' class DiffFileType(object):'
465 BINARY = 3
466 BINARY = 3
466
467
467
468
469 @attr.s
470 class phabhunk(dict):
471 """Represents a Differential hunk, which is owned by a Differential change
472 """
473
474 oldOffset = attr.ib(default=0) # camelcase-required
475 oldLength = attr.ib(default=0) # camelcase-required
476 newOffset = attr.ib(default=0) # camelcase-required
477 newLength = attr.ib(default=0) # camelcase-required
478 corpus = attr.ib(default='')
479 # These get added to the phabchange's equivalents
480 addLines = attr.ib(default=0) # camelcase-required
481 delLines = attr.ib(default=0) # camelcase-required
482
483
468 def creatediff(ctx):
484 def creatediff(ctx):
469 """create a Differential Diff"""
485 """create a Differential Diff"""
470 repo = ctx.repo()
486 repo = ctx.repo()
General Comments 0
You need to be logged in to leave comments. Login now