D4819: identify: only query remote bookmarks if needed

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed Oct 3 08:20:58 EDT 2018


yuja added a comment.


  Queued, thanks.
  
  >   This datahint method returns nothing for -Tjson, -Tpickle, -Tdebug
  >   --config ui.formatdebug=true and --config ui.formatjson, so the
  >   bookmarks won't show up. I don't know what these formatters are for.
  >   plainformatter and templateformatter work properly, and the few other
  >   uses of datahint should have the same kind of problem.
  
  The datahint exists so that template keywords are populated automatically
  in addition to the default data set specified by user options.
  
  >   if bookmarks:
  > 
  > - output.extend(bms) +            output.extend(getbms()) elif default and not ui.quiet:
  >   1. multiple bookmarks for a single parent separated by '/'
  > - bm = '/'.join(bms) +            bm = '/'.join(getbms()) if bm: output.append(bm)
  > 
  >   fm.data(node=hex(remoterev))
  > - fm.data(bookmarks=fm.formatlist(bms, name='bookmark')) +        if 'bookmarks' in fm.datahint(): +            fm.data(bookmarks=fm.formatlist(getbms(), name='bookmark'))
  
  In this case, we'll have to load 'bookmarks' if --bookmarks is set. I have
  no idea if `default and not ui.quiet` should be handled in the same way.
  
  Can you send a followup?

REPOSITORY
  rHG Mercurial

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

To: valentin.gatienbaron, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list