tests/test-template-filters.t
author Martin von Zweigbergk <martinvonz@google.com>
Mon, 18 Jun 2018 16:01:06 -0700
changeset 38417 26523316e4d0
parent 38313 fabfbbf4dee2
permissions -rw-r--r--
tests: use progress helper With this commit, the only in-tree caller of ui.progress() is scmutil.progress(). That means that we could deprecate it. It also means that we can considering inlining it in scmutil.progress. Differential Revision: https://phab.mercurial-scm.org/D3812

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