tests/test-http.t
changeset 20384 c499fff76440
parent 20291 7d589d923b8a
child 20385 54235a6ff98a
equal deleted inserted replaced
20383:4990abb4729d 20384:c499fff76440
   161   > def newgetpass(arg):
   161   > def newgetpass(arg):
   162   >   return "pass"
   162   >   return "pass"
   163   > getpass.getpass = newgetpass
   163   > getpass.getpass = newgetpass
   164   > EOF
   164   > EOF
   165 
   165 
       
   166 #if python243
   166   $ hg id http://localhost:$HGPORT2/
   167   $ hg id http://localhost:$HGPORT2/
   167   abort: http authorization required for http://localhost:$HGPORT2/
   168   abort: http authorization required for http://localhost:$HGPORT2/
   168   [255]
   169   [255]
   169   $ hg id http://localhost:$HGPORT2/
   170   $ hg id http://localhost:$HGPORT2/
   170   abort: http authorization required for http://localhost:$HGPORT2/
   171   abort: http authorization required for http://localhost:$HGPORT2/
   174   realm: mercurial
   175   realm: mercurial
   175   user: user
   176   user: user
   176   password: 5fed3813f7f5
   177   password: 5fed3813f7f5
   177   $ hg id http://user:pass@localhost:$HGPORT2/
   178   $ hg id http://user:pass@localhost:$HGPORT2/
   178   5fed3813f7f5
   179   5fed3813f7f5
       
   180 #endif
   179   $ echo '[auth]' >> .hg/hgrc
   181   $ echo '[auth]' >> .hg/hgrc
   180   $ echo 'l.schemes=http' >> .hg/hgrc
   182   $ echo 'l.schemes=http' >> .hg/hgrc
   181   $ echo 'l.prefix=lo' >> .hg/hgrc
   183   $ echo 'l.prefix=lo' >> .hg/hgrc
   182   $ echo 'l.username=user' >> .hg/hgrc
   184   $ echo 'l.username=user' >> .hg/hgrc
   183   $ echo 'l.password=pass' >> .hg/hgrc
   185   $ echo 'l.password=pass' >> .hg/hgrc
   185   5fed3813f7f5
   187   5fed3813f7f5
   186   $ hg id http://localhost:$HGPORT2/
   188   $ hg id http://localhost:$HGPORT2/
   187   5fed3813f7f5
   189   5fed3813f7f5
   188   $ hg id http://user@localhost:$HGPORT2/
   190   $ hg id http://user@localhost:$HGPORT2/
   189   5fed3813f7f5
   191   5fed3813f7f5
       
   192 #if python243
   190   $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
   193   $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
   191   streaming all changes
   194   streaming all changes
   192   7 files to transfer, 916 bytes of data
   195   7 files to transfer, 916 bytes of data
   193   transferred * bytes in * seconds (*/sec) (glob)
   196   transferred * bytes in * seconds (*/sec) (glob)
   194   updating to branch default
   197   updating to branch default
   198   abort: http authorization required for http://localhost:$HGPORT2/
   201   abort: http authorization required for http://localhost:$HGPORT2/
   199   [255]
   202   [255]
   200   $ hg id http://user:pass2@localhost:$HGPORT2/
   203   $ hg id http://user:pass2@localhost:$HGPORT2/
   201   abort: HTTP Error 403: no
   204   abort: HTTP Error 403: no
   202   [255]
   205   [255]
       
   206 #endif
   203 
   207 
   204   $ cd ..
   208   $ cd ..
   205 
   209 
   206 clone of serve with repo in root and unserved subrepo (issue2970)
   210 clone of serve with repo in root and unserved subrepo (issue2970)
   207 
   211