D3648: show: Get rid of extraneous space if `tip` also has other bookmarks

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Wed May 23 08:41:45 EDT 2018


yuja added a comment.


  > -names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', join(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
  >  +names_tags = '{if(names % "{ifeq(name, 'tip', '', name)}", " ({label('log.{colorname}', separate(names % "{ifeq(name, 'tip', '', name)}", ' '))})")}'
  
  `separate()` can't be used here since it takes non-list arguments.
  
  `separate(sep, arg1, arg2, ...)`
  
  What we can do for now is to move the separator to the inner loop, and
  strip the leading/trailing separator.
  
  `strip(names % "{ifeq(..., "{name} ")}")`
  
  Maybe we'll need a function to filter out empty values?

REPOSITORY
  rHG Mercurial

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

To: tom.prince, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list