Patchwork D7056: phabricator: include bookmark in diff metadata

login
register
mail settings
Submitter phabricator
Date Oct. 11, 2019, 5:55 p.m.
Message ID <598bab30e0f7bb8d0542095556e07ea2@localhost.localdomain>
Download mbox | patch
Permalink /patch/42238/
State Not Applicable
Headers show

Comments

phabricator - Oct. 11, 2019, 5:55 p.m.
Kwan added a comment.
Kwan updated this revision to Diff 17086.


  Fix some test-check-code issues, and one test-check-pyflakes unused local.

REPOSITORY
  rHG Mercurial

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

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
@@ -828,9 +828,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