tests/test-lock-badness.t
changeset 35209 9153871d50e0
parent 33097 fce4ed2912bb
child 36643 1e1c1bfb0be4
equal deleted inserted replaced
35208:1b758105b5c7 35209:9153871d50e0
    55   > def sleephalf(**x): time.sleep(0.5)
    55   > def sleephalf(**x): time.sleep(0.5)
    56   > EOF
    56   > EOF
    57   $ echo b > b/b
    57   $ echo b > b/b
    58   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
    58   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
    59   $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
    59   $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
    60   > > preup 2>&1
    60   > > preup-stdout 2>preup-stderr
    61   $ wait
    61   $ wait
    62   $ cat preup
    62   $ cat preup-stdout
       
    63   $ cat preup-stderr
    63   waiting for lock on working directory of b held by process '*' on host '*' (glob)
    64   waiting for lock on working directory of b held by process '*' on host '*' (glob)
    64   got lock after * seconds (glob)
    65   got lock after * seconds (glob)
    65   $ cat stdout
    66   $ cat stdout
    66   adding b
    67   adding b
       
    68 
       
    69 On processs waiting on another, warning after a long time.
       
    70 
       
    71   $ echo b > b/c
       
    72   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
       
    73   $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
       
    74   > --config ui.timeout.warn=250 \
       
    75   > > preup-stdout 2>preup-stderr
       
    76   $ wait
       
    77   $ cat preup-stdout
       
    78   $ cat preup-stderr
       
    79   $ cat stdout
       
    80   adding c
       
    81 
       
    82 On processs waiting on another, warning disabled.
       
    83 
       
    84   $ echo b > b/d
       
    85   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
       
    86   $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
       
    87   > --config ui.timeout.warn=-1 \
       
    88   > > preup-stdout 2>preup-stderr
       
    89   $ wait
       
    90   $ cat preup-stdout
       
    91   $ cat preup-stderr
       
    92   $ cat stdout
       
    93   adding d
       
    94 
       
    95 check we still print debug output
       
    96 
       
    97 On processs waiting on another, warning after a long time (debug output on)
       
    98 
       
    99   $ echo b > b/e
       
   100   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
       
   101   $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
       
   102   > --config ui.timeout.warn=250 --debug\
       
   103   > > preup-stdout 2>preup-stderr
       
   104   $ wait
       
   105   $ cat preup-stdout
       
   106   calling hook pre-update: hghook_pre-update.sleephalf
       
   107   waiting for lock on working directory of b held by process '*' on host '*' (glob)
       
   108   got lock after * seconds (glob)
       
   109   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   110   $ cat preup-stderr
       
   111   $ cat stdout
       
   112   adding e
       
   113 
       
   114 On processs waiting on another, warning disabled, (debug output on)
       
   115 
       
   116   $ echo b > b/f
       
   117   $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout &
       
   118   $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \
       
   119   > --config ui.timeout.warn=-1 --debug\
       
   120   > > preup-stdout 2>preup-stderr
       
   121   $ wait
       
   122   $ cat preup-stdout
       
   123   calling hook pre-update: hghook_pre-update.sleephalf
       
   124   waiting for lock on working directory of b held by process '*' on host '*' (glob)
       
   125   got lock after * seconds (glob)
       
   126   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   127   $ cat preup-stderr
       
   128   $ cat stdout
       
   129   adding f
    67 
   130 
    68 Pushing to a local read-only repo that can't be locked
   131 Pushing to a local read-only repo that can't be locked
    69 
   132 
    70   $ chmod 100 a/.hg/store
   133   $ chmod 100 a/.hg/store
    71 
   134