tests/test-blackbox.t
changeset 28024 142891ab6e89
parent 26752 949e8c626d19
child 28025 ab6468270b83
equal deleted inserted replaced
28023:b7bf2b0731be 28024:142891ab6e89
    43   adding file changes
    43   adding file changes
    44   added 1 changesets with 1 changes to 1 files
    44   added 1 changesets with 1 changes to 1 files
    45   (run 'hg update' to get a working copy)
    45   (run 'hg update' to get a working copy)
    46   $ hg blackbox -l 5
    46   $ hg blackbox -l 5
    47   1970/01/01 00:00:00 bob (*)> pull (glob)
    47   1970/01/01 00:00:00 bob (*)> pull (glob)
    48   1970/01/01 00:00:00 bob (*)> updated served branch cache in ?.???? seconds (glob)
    48   1970/01/01 00:00:00 bob (*)> updated served branch cache in * seconds (glob)
    49   1970/01/01 00:00:00 bob (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
    49   1970/01/01 00:00:00 bob (*)> wrote served branch cache with 1 labels and 2 nodes (glob)
    50   1970/01/01 00:00:00 bob (*)> 1 incoming changes - new heads: d02f48003e62 (glob)
    50   1970/01/01 00:00:00 bob (*)> 1 incoming changes - new heads: d02f48003e62 (glob)
    51   1970/01/01 00:00:00 bob (*)> pull exited 0 after * seconds (glob)
    51   1970/01/01 00:00:00 bob (*)> pull exited 0 after * seconds (glob)
    52 
    52 
    53 we must not cause a failure if we cannot write to the log
    53 we must not cause a failure if we cannot write to the log
    54 
    54 
    55   $ hg rollback
    55   $ hg rollback
    56   repository tip rolled back to revision 1 (undo pull)
    56   repository tip rolled back to revision 1 (undo pull)
    57 
    57 
    58 #if unix-permissions no-root
    58   $ mv .hg/blackbox.log .hg/blackbox.log-
    59   $ chmod 000 .hg/blackbox.log
    59   $ mkdir .hg/blackbox.log
    60   $ hg --debug incoming
    60   $ hg --debug incoming
    61   warning: cannot write to blackbox.log: Permission denied
    61   warning: cannot write to blackbox.log: * (glob)
    62   comparing with $TESTTMP/blackboxtest (glob)
    62   comparing with $TESTTMP/blackboxtest (glob)
    63   query 1; heads
    63   query 1; heads
    64   searching for changes
    64   searching for changes
    65   all local heads known remotely
    65   all local heads known remotely
    66   changeset:   2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
    66   changeset:   2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
    75   extra:       branch=default
    75   extra:       branch=default
    76   description:
    76   description:
    77   c
    77   c
    78   
    78   
    79   
    79   
    80 #endif
       
    81   $ hg pull
    80   $ hg pull
    82   pulling from $TESTTMP/blackboxtest (glob)
    81   pulling from $TESTTMP/blackboxtest (glob)
    83   searching for changes
    82   searching for changes
    84   adding changesets
    83   adding changesets
    85   adding manifests
    84   adding manifests
    86   adding file changes
    85   adding file changes
    87   added 1 changesets with 1 changes to 1 files
    86   added 1 changesets with 1 changes to 1 files
    88   (run 'hg update' to get a working copy)
    87   (run 'hg update' to get a working copy)
    89 
    88 
    90 a failure reading from the log is fine
    89 a failure reading from the log is fatal
    91 #if unix-permissions no-root
    90 
    92   $ hg blackbox -l 3
    91   $ hg blackbox -l 3
    93   abort: Permission denied: $TESTTMP/blackboxtest2/.hg/blackbox.log
    92   abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob)
    94   [255]
    93   [255]
    95 
    94 
    96   $ chmod 600 .hg/blackbox.log
    95   $ rmdir .hg/blackbox.log
    97 #endif
    96   $ mv .hg/blackbox.log- .hg/blackbox.log
    98 
    97 
    99 backup bundles get logged
    98 backup bundles get logged
   100 
    99 
   101   $ touch d
   100   $ touch d
   102   $ hg commit -Amd
   101   $ hg commit -Amd
   106   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   105   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   107   saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
   106   saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
   108   $ hg blackbox -l 5
   107   $ hg blackbox -l 5
   109   1970/01/01 00:00:00 bob (*)> strip tip (glob)
   108   1970/01/01 00:00:00 bob (*)> strip tip (glob)
   110   1970/01/01 00:00:00 bob (*)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
   109   1970/01/01 00:00:00 bob (*)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
   111   1970/01/01 00:00:00 bob (*)> updated base branch cache in ?.???? seconds (glob)
   110   1970/01/01 00:00:00 bob (*)> updated base branch cache in * seconds (glob)
   112   1970/01/01 00:00:00 bob (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
   111   1970/01/01 00:00:00 bob (*)> wrote base branch cache with 1 labels and 2 nodes (glob)
   113   1970/01/01 00:00:00 bob (*)> strip tip exited 0 after * seconds (glob)
   112   1970/01/01 00:00:00 bob (*)> strip tip exited 0 after * seconds (glob)
   114 
   113 
   115 extension and python hooks - use the eol extension for a pythonhook
   114 extension and python hooks - use the eol extension for a pythonhook
   116 
   115 
   140   2:d02f48003e62
   139   2:d02f48003e62
   141   $ ls .hg/blackbox.log*
   140   $ ls .hg/blackbox.log*
   142   .hg/blackbox.log
   141   .hg/blackbox.log
   143   .hg/blackbox.log.1
   142   .hg/blackbox.log.1
   144   .hg/blackbox.log.2
   143   .hg/blackbox.log.2
       
   144   $ cd ..
       
   145 
       
   146   $ hg init blackboxtest3
       
   147   $ cd blackboxtest3
       
   148   $ hg blackbox
       
   149   $ mv .hg/blackbox.log .hg/blackbox.log-
       
   150   $ mkdir .hg/blackbox.log
       
   151   $ sed -e 's/\(.*test1.*\)/#\1/; s#\(.*commit2.*\)#os.rmdir(".hg/blackbox.log")\nos.rename(".hg/blackbox.log-", ".hg/blackbox.log")\n\1#' $TESTDIR/test-dispatch.py > ../test-dispatch.py
       
   152   $ python ../test-dispatch.py
       
   153   running: add foo
       
   154   result: 0
       
   155   running: commit -m commit1 -d 2000-01-01 foo
       
   156   result: None
       
   157   running: commit -m commit2 -d 2000-01-02 foo
       
   158   result: None
       
   159   running: log -r 0
       
   160   changeset:   0:0e4634943879
       
   161   user:        test
       
   162   date:        Sat Jan 01 00:00:00 2000 +0000
       
   163   summary:     commit1
       
   164   
       
   165   result: None
       
   166   running: log -r tip
       
   167   changeset:   1:45589e459b2e
       
   168   tag:         tip
       
   169   user:        test
       
   170   date:        Sun Jan 02 00:00:00 2000 +0000
       
   171   summary:     commit2
       
   172   
       
   173   result: None
       
   174   $ hg blackbox
       
   175   1970/01/01 00:00:00 bob (*)> blackbox (glob)
       
   176   1970/01/01 00:00:00 bob (*)> blackbox exited 0 after * seconds (glob)
   145 
   177 
   146 cleanup
   178 cleanup
   147   $ cd ..
   179   $ cd ..