tests/test-blackbox.t
author timeless <timeless@mozdev.org>
Wed, 24 Feb 2016 20:04:32 +0000
changeset 28242 e8ad56d95fbb
parent 28029 72072cfc7e91
child 28245 caa2a0c6fbb7
permissions -rw-r--r--
tests: mock getpid to reduce glob usage Updating tests based on ac49ecb2a897.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     1
setup
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     3
  > [extensions]
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     4
  > blackbox=
24705
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21031
diff changeset
     5
  > mock=$TESTDIR/mockblackbox.py
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
     6
  > mq=
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     7
  > EOF
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     8
  $ hg init blackboxtest
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
     9
  $ cd blackboxtest
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    10
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    11
command, exit codes, and duration
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    12
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    13
  $ echo a > a
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    14
  $ hg add a
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    15
  $ hg blackbox
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    16
  1970/01/01 00:00:00 bob (5000)> add a
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    17
  1970/01/01 00:00:00 bob (5000)> add a exited 0 after * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    18
  1970/01/01 00:00:00 bob (5000)> blackbox
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
    19
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    20
incoming change tracking
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    21
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    22
create two heads to verify that we only see one change in the log later
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    23
  $ hg commit -ma
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    24
  $ hg up null
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    25
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    26
  $ echo b > b
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    27
  $ hg commit -Amb
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    28
  adding b
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    29
  created new head
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    30
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    31
clone, commit, pull
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    32
  $ hg clone . ../blackboxtest2
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    33
  updating to branch default
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    34
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    35
  $ echo c > c
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    36
  $ hg commit -Amc
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    37
  adding c
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    38
  $ cd ../blackboxtest2
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    39
  $ hg pull
18719
9ad13296c581 tests: append glob to filename output when required for windows
Simon Heimberg <simohe@besonet.ch>
parents: 18677
diff changeset
    40
  pulling from $TESTTMP/blackboxtest (glob)
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    41
  searching for changes
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    42
  adding changesets
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    43
  adding manifests
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    44
  adding file changes
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    45
  added 1 changesets with 1 changes to 1 files
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    46
  (run 'hg update' to get a working copy)
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 28024
diff changeset
    47
  $ hg blackbox -l 6
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    48
  1970/01/01 00:00:00 bob (5000)> pull
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    49
  1970/01/01 00:00:00 bob (5000)> updated served branch cache in * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    50
  1970/01/01 00:00:00 bob (5000)> wrote served branch cache with 1 labels and 2 nodes
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    51
  1970/01/01 00:00:00 bob (5000)> 1 incoming changes - new heads: d02f48003e62
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    52
  1970/01/01 00:00:00 bob (5000)> pull exited 0 after * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
    53
  1970/01/01 00:00:00 bob (5000)> blackbox -l 6
18677
539210ed2069 blackbox: only show new heads on incoming
Durham Goode <durham@fb.com>
parents: 18674
diff changeset
    54
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    55
we must not cause a failure if we cannot write to the log
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    56
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    57
  $ hg rollback
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    58
  repository tip rolled back to revision 1 (undo pull)
19082
63dda3c3bb11 blackbox: don't run permission tests on non-unix systems
Durham Goode <durham@fb.com>
parents: 19066
diff changeset
    59
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    60
  $ mv .hg/blackbox.log .hg/blackbox.log-
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    61
  $ mkdir .hg/blackbox.log
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    62
  $ hg --debug incoming
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    63
  warning: cannot write to blackbox.log: * (glob)
18836
a7d0ddc7540b blackbox: fix a few check-code portability errors
Bryan O'Sullivan <bryano@fb.com>
parents: 18787
diff changeset
    64
  comparing with $TESTTMP/blackboxtest (glob)
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    65
  query 1; heads
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    66
  searching for changes
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    67
  all local heads known remotely
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    68
  changeset:   2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    69
  tag:         tip
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    70
  phase:       draft
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    71
  parent:      1:6563da9dcf87b1949716e38ff3e3dfaa3198eb06
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    72
  parent:      -1:0000000000000000000000000000000000000000
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    73
  manifest:    2:ab9d46b053ebf45b7996f2922b9893ff4b63d892
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    74
  user:        test
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    75
  date:        Thu Jan 01 00:00:00 1970 +0000
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    76
  files+:      c
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    77
  extra:       branch=default
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    78
  description:
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    79
  c
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    80
  
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    81
  
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    82
  $ hg pull
18836
a7d0ddc7540b blackbox: fix a few check-code portability errors
Bryan O'Sullivan <bryano@fb.com>
parents: 18787
diff changeset
    83
  pulling from $TESTTMP/blackboxtest (glob)
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    84
  searching for changes
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    85
  adding changesets
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    86
  adding manifests
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    87
  adding file changes
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    88
  added 1 changesets with 1 changes to 1 files
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    89
  (run 'hg update' to get a working copy)
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    90
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    91
a failure reading from the log is fatal
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    92
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    93
  $ hg blackbox -l 3
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    94
  abort: *$TESTTMP/blackboxtest2/.hg/blackbox.log* (glob)
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    95
  [255]
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    96
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    97
  $ rmdir .hg/blackbox.log
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
    98
  $ mv .hg/blackbox.log- .hg/blackbox.log
18786
ed39a8f94e95 blackbox: prevent failed I/O from causing hg to abort
Bryan O'Sullivan <bryano@fb.com>
parents: 18766
diff changeset
    99
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   100
backup bundles get logged
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   101
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   102
  $ touch d
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   103
  $ hg commit -Amd
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   104
  adding d
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   105
  created new head
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   106
  $ hg strip tip
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   107
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   108
  saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/*-backup.hg (glob)
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 28024
diff changeset
   109
  $ hg blackbox -l 6
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   110
  1970/01/01 00:00:00 bob (5000)> strip tip
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   111
  1970/01/01 00:00:00 bob (5000)> saved backup bundle to $TESTTMP/blackboxtest2/.hg/strip-backup/73f6ee326b27-7612e004-backup.hg (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   112
  1970/01/01 00:00:00 bob (5000)> updated base branch cache in * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   113
  1970/01/01 00:00:00 bob (5000)> wrote base branch cache with 1 labels and 2 nodes
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   114
  1970/01/01 00:00:00 bob (5000)> strip tip exited 0 after * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   115
  1970/01/01 00:00:00 bob (5000)> blackbox -l 6
18766
64b5562550e2 blackbox: add backup bundle paths to blackbox logs
Durham Goode <durham@fb.com>
parents: 18720
diff changeset
   116
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   117
extension and python hooks - use the eol extension for a pythonhook
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   118
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   119
  $ echo '[extensions]' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   120
  $ echo 'eol=' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   121
  $ echo '[hooks]' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   122
  $ echo 'update = echo hooked' >> .hg/hgrc
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   123
  $ hg update
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26185
diff changeset
   124
  hooked
26028
6fbe35588433 update: wlock the repo for the whole 'hg update' command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 24763
diff changeset
   125
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28028
diff changeset
   126
  1 other heads for branch "default"
28025
ab6468270b83 blackbox: flush output file descriptor
timeless <timeless@mozdev.org>
parents: 28024
diff changeset
   127
  $ hg blackbox -l 6
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   128
  1970/01/01 00:00:00 bob (5000)> update
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   129
  1970/01/01 00:00:00 bob (5000)> writing .hg/cache/tags2-visible with 0 tags
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   130
  1970/01/01 00:00:00 bob (5000)> pythonhook-preupdate: hgext.eol.preupdate finished in * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   131
  1970/01/01 00:00:00 bob (5000)> exthook-update: echo hooked finished in * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   132
  1970/01/01 00:00:00 bob (5000)> update exited 0 after * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   133
  1970/01/01 00:00:00 bob (5000)> blackbox -l 6
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   134
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   135
log rotation
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   136
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   137
  $ echo '[blackbox]' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   138
  $ echo 'maxsize = 20 b' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   139
  $ echo 'maxfiles = 3' >> .hg/hgrc
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   140
  $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   141
  $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   142
  $ hg status
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   143
  $ hg tip -q
24706
5150b2b5b345 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 24705
diff changeset
   144
  2:d02f48003e62
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   145
  $ ls .hg/blackbox.log*
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   146
  .hg/blackbox.log
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   147
  .hg/blackbox.log.1
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   148
  .hg/blackbox.log.2
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   149
  $ cd ..
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   150
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   151
  $ hg init blackboxtest3
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   152
  $ cd blackboxtest3
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   153
  $ hg blackbox
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   154
  1970/01/01 00:00:00 bob (5000)> blackbox
28024
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   155
  $ mv .hg/blackbox.log .hg/blackbox.log-
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   156
  $ mkdir .hg/blackbox.log
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   157
  $ 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
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   158
  $ python ../test-dispatch.py
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   159
  running: add foo
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   160
  result: 0
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   161
  running: commit -m commit1 -d 2000-01-01 foo
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   162
  result: None
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   163
  running: commit -m commit2 -d 2000-01-02 foo
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   164
  result: None
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   165
  running: log -r 0
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   166
  changeset:   0:0e4634943879
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   167
  user:        test
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   168
  date:        Sat Jan 01 00:00:00 2000 +0000
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   169
  summary:     commit1
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   170
  
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   171
  result: None
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   172
  running: log -r tip
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   173
  changeset:   1:45589e459b2e
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   174
  tag:         tip
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   175
  user:        test
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   176
  date:        Sun Jan 02 00:00:00 2000 +0000
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   177
  summary:     commit2
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   178
  
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   179
  result: None
142891ab6e89 tests: change blackbox test to work cross platform
timeless <timeless@mozdev.org>
parents: 26752
diff changeset
   180
  $ hg blackbox
28242
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   181
  1970/01/01 00:00:00 bob (5000)> blackbox
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   182
  1970/01/01 00:00:00 bob (5000)> blackbox exited 0 after * seconds (glob)
e8ad56d95fbb tests: mock getpid to reduce glob usage
timeless <timeless@mozdev.org>
parents: 28029
diff changeset
   183
  1970/01/01 00:00:00 bob (5000)> blackbox
19066
2cad301a7f06 blackbox: automatically rotate log files
Bryan O'Sullivan <bryano@fb.com>
parents: 18836
diff changeset
   184
18674
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   185
cleanup
c61b49d059eb blackbox: tests for the blackbox extension
Durham Goode <durham@fb.com>
parents:
diff changeset
   186
  $ cd ..