##// END OF EJS Templates
phabricator: add the phabdiff data structure...
Ian Moody -
r43455:75e7628b default
parent child Browse files
Show More
@@ -522,6 +522,32 b' class phabchange(object):'
522 self.delLines += hunk.delLines
522 self.delLines += hunk.delLines
523
523
524
524
525 @attr.s
526 class phabdiff(object):
527 """Represents a Differential diff, owns Differential changes. Corresponds
528 to a commit.
529 """
530
531 # Doesn't seem to be any reason to send this (output of uname -n)
532 sourceMachine = attr.ib(default=b'') # camelcase-required
533 sourcePath = attr.ib(default=b'/') # camelcase-required
534 sourceControlBaseRevision = attr.ib(default=b'0' * 40) # camelcase-required
535 sourceControlPath = attr.ib(default=b'/') # camelcase-required
536 sourceControlSystem = attr.ib(default=b'hg') # camelcase-required
537 branch = attr.ib(default=b'default')
538 bookmark = attr.ib(default=None)
539 creationMethod = attr.ib(default=b'phabsend') # camelcase-required
540 lintStatus = attr.ib(default=b'none') # camelcase-required
541 unitStatus = attr.ib(default=b'none') # camelcase-required
542 changes = attr.ib(default=attr.Factory(dict))
543 repositoryPHID = attr.ib(default=None) # camelcase-required
544
545 def addchange(self, change):
546 if not isinstance(change, phabchange):
547 raise error.Abort(b'phabdiff.addchange only takes phabchanges')
548 self.changes[change.currentPath] = change
549
550
525 def creatediff(ctx):
551 def creatediff(ctx):
526 """create a Differential Diff"""
552 """create a Differential Diff"""
527 repo = ctx.repo()
553 repo = ctx.repo()
General Comments 0
You need to be logged in to leave comments. Login now