From patchwork Thu Oct 10 21:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7041: phabricator: add the DiffChangeType and DiffFileType constants From: phabricator X-Patchwork-Id: 42197 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 10 Oct 2019 21:52:02 +0000 Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY These are used in Phabricator change objects. There are more values but so far as I can tell we don't need them. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D7041 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS To: Kwan, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -448,6 +448,23 @@ return output.getvalue() +class DiffChangeType: + ADD = 1 + CHANGE = 2 + DELETE = 3 + MOVE_AWAY = 4 + COPY_AWAY = 5 + MOVE_HERE = 6 + COPY_HERE = 7 + MULTICOPY = 8 + + +class DiffFileType: + TEXT = 1 + IMAGE = 2 + BINARY = 3 + + def creatediff(ctx): """create a Differential Diff""" repo = ctx.repo()