tests/test-globalopts.t
changeset 12316 4134686b83e1
parent 12194 9e40ea08c2ab
child 12375 02990e22150b
equal deleted inserted replaced
12315:ca58f6475f1d 12316:4134686b83e1
    58   0: a
    58   0: a
    59   $ hg ann a/a a/a
    59   $ hg ann a/a a/a
    60   0: a
    60   0: a
    61   $ hg ann a/a b/b
    61   $ hg ann a/a b/b
    62   abort: There is no Mercurial repository here (.hg not found)!
    62   abort: There is no Mercurial repository here (.hg not found)!
       
    63   [255]
    63   $ hg -R b ann a/a
    64   $ hg -R b ann a/a
    64   abort: a/a not under root
    65   abort: a/a not under root
       
    66   [255]
    65   $ hg log
    67   $ hg log
    66   abort: There is no Mercurial repository here (.hg not found)!
    68   abort: There is no Mercurial repository here (.hg not found)!
       
    69   [255]
    67 
    70 
    68 Abbreviation of long option:
    71 Abbreviation of long option:
    69 
    72 
    70   $ hg --repo c tip
    73   $ hg --repo c tip
    71   changeset:   1:b6c483daf290
    74   changeset:   1:b6c483daf290
   101 
   104 
   102 earlygetopt with illegal abbreviations:
   105 earlygetopt with illegal abbreviations:
   103 
   106 
   104   $ hg --confi "foo.bar=baz"
   107   $ hg --confi "foo.bar=baz"
   105   abort: option --config may not be abbreviated!
   108   abort: option --config may not be abbreviated!
       
   109   [255]
   106   $ hg --cw a tip
   110   $ hg --cw a tip
   107   abort: option --cwd may not be abbreviated!
   111   abort: option --cwd may not be abbreviated!
       
   112   [255]
   108   $ hg --rep a tip
   113   $ hg --rep a tip
   109   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
   114   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
       
   115   [255]
   110   $ hg --repositor a tip
   116   $ hg --repositor a tip
   111   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
   117   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
       
   118   [255]
   112   $ hg -qR a tip
   119   $ hg -qR a tip
   113   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
   120   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
       
   121   [255]
   114   $ hg -qRa tip
   122   $ hg -qRa tip
   115   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
   123   abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
       
   124   [255]
   116 
   125 
   117 Testing --cwd:
   126 Testing --cwd:
   118 
   127 
   119   $ hg --cwd a parents
   128   $ hg --cwd a parents
   120   changeset:   0:8580ff50825a
   129   changeset:   0:8580ff50825a
   177 
   186 
   178   $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
   187   $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
   179   quuxfoo
   188   quuxfoo
   180   $ hg --cwd c --config '' tip -q
   189   $ hg --cwd c --config '' tip -q
   181   abort: malformed --config option: '' (use --config section.name=value)
   190   abort: malformed --config option: '' (use --config section.name=value)
       
   191   [255]
   182   $ hg --cwd c --config a.b tip -q
   192   $ hg --cwd c --config a.b tip -q
   183   abort: malformed --config option: 'a.b' (use --config section.name=value)
   193   abort: malformed --config option: 'a.b' (use --config section.name=value)
       
   194   [255]
   184   $ hg --cwd c --config a tip -q
   195   $ hg --cwd c --config a tip -q
   185   abort: malformed --config option: 'a' (use --config section.name=value)
   196   abort: malformed --config option: 'a' (use --config section.name=value)
       
   197   [255]
   186   $ hg --cwd c --config a.= tip -q
   198   $ hg --cwd c --config a.= tip -q
   187   abort: malformed --config option: 'a.=' (use --config section.name=value)
   199   abort: malformed --config option: 'a.=' (use --config section.name=value)
       
   200   [255]
   188   $ hg --cwd c --config .b= tip -q
   201   $ hg --cwd c --config .b= tip -q
   189   abort: malformed --config option: '.b=' (use --config section.name=value)
   202   abort: malformed --config option: '.b=' (use --config section.name=value)
       
   203   [255]
   190 
   204 
   191 Testing --debug:
   205 Testing --debug:
   192 
   206 
   193   $ hg --cwd c log --debug
   207   $ hg --cwd c log --debug
   194   changeset:   1:b6c483daf2907ce5825c0bb50f5716226281cc1a
   208   changeset:   1:b6c483daf2907ce5825c0bb50f5716226281cc1a