tests/test-dispatch.t
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 03 Sep 2012 14:35:31 +0200
changeset 17716 1adba7ff4d26
parent 17014 50fbe9063ff2
child 18226 fe67db018bd7
permissions -rw-r--r--
hidden: remove tags use in hidden computation Tags initially prevented revision to be hidden. It seemed a bad idea to have tags refer to revisions that one can't see. But proper filtering of hidden revisions excludes them from tag computation. Coming changelog filtering will do that. Anyway, tags that really matter will likely be public and therefore not hidden. The current working directory parent and bookmarked revision are still not hidden. Bookmarks were likely automatically moved at rewrite time, bookmarks that remain on obsolete revisions were probably moved there on purpose.

test command parsing and dispatch

  $ hg init a
  $ cd a

Redundant options used to crash (issue436):
  $ hg -v log -v
  $ hg -v log -v x

  $ echo a > a
  $ hg ci -Ama
  adding a

Missing arg:

  $ hg cat
  hg cat: invalid arguments
  hg cat [OPTION]... FILE...
  
  output the current or given revision of files
  
  options:
  
   -o --output FORMAT       print output to file with formatted name
   -r --rev REV             print the given revision
      --decode              apply any matching decode filter
   -I --include PATTERN [+] include names matching the given patterns
   -X --exclude PATTERN [+] exclude names matching the given patterns
  
  [+] marked option can be specified multiple times
  
  use "hg help cat" to show the full help text
  [255]

[defaults]

  $ hg cat a
  a
  $ cat >> $HGRCPATH <<EOF
  > [defaults]
  > cat = -r null
  > EOF
  $ hg cat a
  a: no such file in rev 000000000000
  [1]

  $ cd "$TESTTMP"

#if no-outer-repo

No repo:

  $ cd $dir
  $ hg cat
  abort: no repository found in '$TESTTMP' (.hg not found)!
  [255]

#endif