D3439: templatefilters: add commonprefix

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Jun 2 23:35:54 EDT 2018


yuja added a comment.


  For the record, I still believe the commonprefix of a pair of identical paths
  should be the path itself as it is the longest sub-component of these paths.
  
  >> +  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commonprefix}\n'
  >  > +  foo
  > 
  > should be "foo/bar"
  
  And removing the leading slash is awkward.
  
  >> +  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commonprefix}\n'
  >  > +  foo
  > 
  > should be "/foo/bar"

REPOSITORY
  rHG Mercurial

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

To: joerg.sonnenberger, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list