Patchwork D7056: phabricator: include bookmark in diff metadata

login
register
mail settings
Submitter phabricator
Date Oct. 12, 2019, 1:46 p.m.
Message ID <92134ae3dff126aa159578002dd72912@localhost.localdomain>
Download mbox | patch
Permalink /patch/42266/
State Not Applicable
Headers show

Comments

phabricator - Oct. 12, 2019, 1:46 p.m.
Kwan added a comment.
Kwan updated this revision to Diff 17106.


  I'd missed out the attrs key conversion needed on py3.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7056?vs=17086&id=17106

BRANCH
  creatediff (bookmark) on default (branch)

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7056/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7056

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: Kwan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -830,9 +830,11 @@ 
     repo = ctx.repo()
     repophid = getrepophid(repo)
     # Create a "Differential Diff" via "differential.creatediff" API
+    bookmark = ctx.bookmarks()[0] if ctx.bookmarks() else None
     pdiff = phabdiff(
         sourceControlBaseRevision=b'%s' % ctx.p1().hex(),
         branch=b'%s' % ctx.branch(),
+        bookmark=bookmark,
     )
     modified, added, removed, _d, _u, _i, _c = ctx.p1().status(ctx)
     # addadded will remove moved files from removed, so addremoved won't get