tests/test-paths.t
changeset 27728 294037159c64
parent 27726 7e9dc8bbebf6
child 28038 72f2a19c5f88
child 28173 1ff28873830e
equal deleted inserted replaced
27727:1a6fd929056f 27728:294037159c64
     8 
     8 
     9   $ hg paths
     9   $ hg paths
    10   $ hg paths unknown
    10   $ hg paths unknown
    11   not found!
    11   not found!
    12   [1]
    12   [1]
       
    13   $ hg paths -Tjson
       
    14   [
       
    15   ]
    13 
    16 
    14 with paths:
    17 with paths:
    15 
    18 
    16   $ echo '[paths]' >> .hg/hgrc
    19   $ echo '[paths]' >> .hg/hgrc
    17   $ echo 'dupe = ../b#tip' >> .hg/hgrc
    20   $ echo 'dupe = ../b#tip' >> .hg/hgrc
    50   $ hg paths unknown
    53   $ hg paths unknown
    51   not found!
    54   not found!
    52   [1]
    55   [1]
    53   $ hg paths -q unknown
    56   $ hg paths -q unknown
    54   [1]
    57   [1]
       
    58 
       
    59 formatter output with paths:
       
    60 
       
    61   $ echo 'dupe:pushurl = https://example.com/dupe' >> .hg/hgrc
       
    62   $ hg paths -Tjson
       
    63   [
       
    64    {
       
    65     "name": "dupe",
       
    66     "pushurl": "https://example.com/dupe",
       
    67     "url": "$TESTTMP/b#tip"
       
    68    },
       
    69    {
       
    70     "name": "expand",
       
    71     "url": "$TESTTMP/a/$SOMETHING/bar"
       
    72    }
       
    73   ]
       
    74   $ hg paths -Tjson dupe
       
    75   [
       
    76    {
       
    77     "name": "dupe",
       
    78     "pushurl": "https://example.com/dupe",
       
    79     "url": "$TESTTMP/b#tip"
       
    80    }
       
    81   ]
       
    82   $ hg paths -Tjson -q unknown
       
    83   [
       
    84   ]
       
    85   [1]
       
    86 
       
    87 password should be masked in plain output, but not in machine-readable output:
       
    88 
       
    89   $ echo 'insecure = http://foo:insecure@example.com/' >> .hg/hgrc
       
    90   $ hg paths insecure
       
    91   http://foo:***@example.com/
       
    92   $ hg paths -Tjson insecure
       
    93   [
       
    94    {
       
    95     "name": "insecure",
       
    96     "url": "http://foo:insecure@example.com/"
       
    97    }
       
    98   ]
       
    99 
    55   $ cd ..
   100   $ cd ..
    56 
   101 
    57 sub-options for an undeclared path are ignored
   102 sub-options for an undeclared path are ignored
    58 
   103 
    59   $ hg init suboptions
   104   $ hg init suboptions