tests/test-template-filters.t
author Pulkit Goyal <7895pulkit@gmail.com>
Sun, 03 Jun 2018 17:02:38 +0530
changeset 38221 ee1f052b45ef
parent 38201 56dd15178190
child 38304 fabfbbf4dee2
permissions -rw-r--r--
configitems: drop the deprecated alias for commands.update.check experimental.updatecheck was deprecated and should have been removed once 4.4 was released. Let's drop it now. Differential Revision: https://phab.mercurial-scm.org/D3679

  $ hg debugtemplate '{""|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"foo\n/foo"|splitlines|commonprefix}\n'
  
  $ hg init
  $ hg log -r null -T '{rev|commonprefix}'
  hg: parse error: argument is not a list of text
  (template filter 'commonprefix' is not compatible with keyword 'rev')
  [255]