tests/test-template-filters.t
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 15 Jun 2018 02:07:39 +0530
changeset 38311 47f5454a30ed
parent 38304 fabfbbf4dee2
permissions -rw-r--r--
cmdutil: say that `graft --stop` stops the graft instead of aborting I am going to add a --abort flag to graft soon, so we make sure we differentiate between the what --stop flag does and what --abort does and don't use the words interchangeably. Differential Revision: https://phab.mercurial-scm.org/D3735
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
     1
  $ hg debugtemplate '{""|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
     2
  
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
     3
  $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
     4
  foo
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
     5
  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
     6
  foo
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
     7
  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
     8
  foo
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
     9
  $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    10
  
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    11
  $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    12
  
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    13
  $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    14
  
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    15
  $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    16
  foo
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    17
  $ hg debugtemplate '{"foo\n/foo"|splitlines|commondir}\n'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    18
  
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    19
  $ hg init
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    20
  $ hg log -r null -T '{rev|commondir}'
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    21
  hg: parse error: argument is not a list of text
38304
fabfbbf4dee2 templatefilters: rename commonprefix to commondir
Martin von Zweigbergk <martinvonz@google.com>
parents: 38201
diff changeset
    22
  (template filter 'commondir' is not compatible with keyword 'rev')
38201
56dd15178190 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de>
parents:
diff changeset
    23
  [255]