tests/test-chg.t
changeset 40827 d23fd01cc115
parent 40826 1617aa916d88
child 40828 25e9089c7686
equal deleted inserted replaced
40826:1617aa916d88 40827:d23fd01cc115
     1 #require chg
     1 #require chg
     2 
     2 
       
     3   $ mkdir log
     3   $ cat <<'EOF' >> $HGRCPATH
     4   $ cat <<'EOF' >> $HGRCPATH
     4   > [cmdserver]
     5   > [cmdserver]
     5   > log = $TESTTMP/server.log
     6   > log = $TESTTMP/log/server.log
       
     7   > max-log-files = 1
       
     8   > max-log-size = 10 kB
     6   > EOF
     9   > EOF
     7   $ cp $HGRCPATH $HGRCPATH.orig
    10   $ cp $HGRCPATH $HGRCPATH.orig
     8 
    11 
     9   $ filterlog () {
    12   $ filterlog () {
    10   >   sed -e 's!^[0-9/]* [0-9:]* ([0-9]*)>!YYYY/MM/DD HH:MM:SS (PID)>!' \
    13   >   sed -e 's!^[0-9/]* [0-9:]* ([0-9]*)>!YYYY/MM/DD HH:MM:SS (PID)>!' \
   217   $ CHGSOCKNAME=$OLDCHGSOCKNAME
   220   $ CHGSOCKNAME=$OLDCHGSOCKNAME
   218   $ cd ..
   221   $ cd ..
   219 
   222 
   220 check that server events are recorded:
   223 check that server events are recorded:
   221 
   224 
   222   $ cat server.log | filterlog
   225   $ ls log
   223   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   226   server.log
   224   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
   227   server.log.1
   225   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
   228 
   226   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
   229 print only the last 10 lines, since we aren't sure how many records are
   227   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
   230 preserved:
   228   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
   231 
   229   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   232   $ cat log/server.log.1 log/server.log | tail -10 | filterlog
   230   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   231   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   232   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   233   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/foo'
       
   234   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   235   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   236   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   237   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   238   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   239   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   240   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/foo'
       
   241   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   242   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   243   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   244   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   245   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   246   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/foo'
       
   247   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   248   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   249   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   250   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   251   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   252   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   253   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
       
   254   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   255   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   256   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   257   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   258   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   259   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   260   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/editor'
       
   261   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   262   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   263   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   264   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   265   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   266   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   267   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/editor'
       
   268   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   269   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   270   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   271   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   272   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   273   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   274   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   275   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/editor'
       
   276   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   277   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   278   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   279   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   280   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   281   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   282   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/editor'
       
   283   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   284   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   285   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   286   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   287   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   288   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   289   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/editor'
       
   290   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   291   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   292   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   293   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   294   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   295   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   296   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
       
   297   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   298   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   299   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   300   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   301   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   302   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   303   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
       
   304   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   305   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   306   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   307   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   308   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   309   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   310   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   311   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   312   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   313   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   314   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   315   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   316   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   317   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   318   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   319   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   320   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   321   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   322   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   323   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   324   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   325   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   326   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   327   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   328   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   329   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   330   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   331   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   332   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   333   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   334   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   335   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   336   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   337   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   338   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   339   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   340   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   341   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   342   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   343   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   344   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   345   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   346   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   347   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   348   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   349   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   350   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   351   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   352   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   353   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   354   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   355   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/pager'
       
   356   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   357   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   358   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   359   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   360   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   361   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   362   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   363   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
       
   364   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   365   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   366   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   367   YYYY/MM/DD HH:MM:SS (PID)> validate: ['redirect $TESTTMP.chgsock/server-...']
       
   368   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   369   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   370   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP'
       
   371   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   372   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   373   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   233   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   374   YYYY/MM/DD HH:MM:SS (PID)> validate: []
   234   YYYY/MM/DD HH:MM:SS (PID)> validate: []
   375   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   235   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   376   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
   236   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
   377   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
   237   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
   378   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
   238   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
   379   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
   239   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
   380   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
   240   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
   381   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   241   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
   382   YYYY/MM/DD HH:MM:SS (PID)> validate: []
   242   YYYY/MM/DD HH:MM:SS (PID)> validate: []
   383   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   384   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   385   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
       
   386   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   387   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   388   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   389   YYYY/MM/DD HH:MM:SS (PID)> validate: ['unlink $TESTTMP/extreload/chgsock/server-...', 'reconnect']
       
   390   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   391   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   392   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   393   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
       
   394   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   395   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   396   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   397   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   398   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   399   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   400   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
       
   401   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   402   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   403   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   404   YYYY/MM/DD HH:MM:SS (PID)> validate: []
       
   405   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   406   YYYY/MM/DD HH:MM:SS (PID)> setprocname: ...
       
   407   YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
       
   408   YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
       
   409   YYYY/MM/DD HH:MM:SS (PID)> setumask 18
       
   410   YYYY/MM/DD HH:MM:SS (PID)> setenv: ...
       
   411   YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ...
       
   412   YYYY/MM/DD HH:MM:SS (PID)> validate: []