tests/test-transaction-wc-rollback-race.t
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 11 Jul 2024 20:54:06 -0400
changeset 51685 0eb515c7bec8
parent 50174 596a6b9b0570
child 51946 d7e61891ab5a
permissions -rw-r--r--
typing: add trivial type hints to the convert extension's common modules This started as ensuring that the `encoding` and `orig_encoding` attributes has a type other than `Any`, so pytype can catch problems where it needs to be str for stdlib encoding and decoding. It turns out that adding the hint in `mercurial.encoding` is what was needed, but I picked a bunch of low hanging fruit while here. There's definitely more to do, and I see a problem where `shlex.shlex` is being fed bytes instead of str, but there are not enough type hints yet to make pytype notice.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50169
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
=======================================================================
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
Check potential race condition around transaction and working copy data
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
=======================================================================
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
#testcases bookmarks-in-store bookmarks-wc-level
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
The transaction is garanteed to run with the lock, but may runs without the
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
wlock. So if the transaction backup/restore some content related to the
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
working-copy and protected by the wlock, we might run into trouble if another
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
process grab the wlock and modify them.
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
This test file is testing various cases where such parallel changes happens to
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
validate the transaction behavior.
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
Other is used to get a simple pull source. As pull is a simple way to create
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
transaction without the wlock.
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
Setup
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
=====
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
Avoid long deadlock
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
  $ cat << EOF >> $HGRCPATH
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  > [ui]
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
  > timeout=10
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
  > EOF
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
#if bookmarks-in-store
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
  $ cat << EOF >> $HGRCPATH
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
  > [format]
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
  > bookmarks-in-store = yes
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
  > EOF
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
#endif
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
  $ hg init repo
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
  $ cd repo
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  $ for filename in a b c d e f g h i j k l m; do
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  >     echo $filename > default_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
  >     hg add default_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
  >     hg commit --quiet --message default_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
  > done
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
  $ hg bookmark --rev . foo
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
  $ hg branch babar
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
  marked working directory as branch babar
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
  (branches are permanent and global, did you want a bookmark?)
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
  $ for filename in a b c d e f g h i j k l m; do
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
  >     echo $filename > babar_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
  >     hg add babar_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  >     hg commit --quiet --message babar_$filename
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  > done
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  $ hg bookmark --rev . bar
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  $ hg up 'desc("default_m")'
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  0 files updated, 0 files merged, 13 files removed, 0 files unresolved
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  $ hg log -G -T '[{branch}] ({bookmarks}) {desc}\n'
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
  o  [babar] (bar) babar_m
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
  o  [babar] () babar_l
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
  o  [babar] () babar_k
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  o  [babar] () babar_j
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  o  [babar] () babar_i
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
  o  [babar] () babar_h
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  o  [babar] () babar_g
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  o  [babar] () babar_f
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  o  [babar] () babar_e
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  o  [babar] () babar_d
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    76
  o  [babar] () babar_c
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
  o  [babar] () babar_b
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
  o  [babar] () babar_a
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
  @  [default] (foo) default_m
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  o  [default] () default_l
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
  o  [default] () default_k
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  o  [default] () default_j
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  o  [default] () default_i
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
  o  [default] () default_h
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  o  [default] () default_g
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
  o  [default] () default_f
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    98
  o  [default] () default_e
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    99
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   100
  o  [default] () default_d
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  o  [default] () default_c
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
  o  [default] () default_b
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   105
  |
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   106
  o  [default] () default_a
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   107
  
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   108
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   109
  $ cat << EOF >> ../txn-close.sh
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   110
  > rm -f $TESTTMP/transaction-continue
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   111
  > $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-continue $TESTTMP/transaction-waiting
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   112
  > rm -f $TESTTMP/transaction-waiting
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   113
  > exit 1
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   114
  > EOF
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   115
  $ cat << EOF >> .hg/hgrc
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   116
  > [hooks]
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   117
  > pretxnclose.test = sh $TESTTMP/txn-close.sh
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   118
  > EOF
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   119
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
Check the overall logic is working, the transaction is holding the `lock` , but
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   121
not the `wlock`, then get aborted on a signal-file.
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   123
  $ hg phase --rev 0
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   124
  0: draft
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   125
  $ hg phase --public --rev 0 2> ../log.err &
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   126
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   127
  $ echo y | hg --config ui.interactive=yes debuglock --set-wlock
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   128
  ready to release the lock (y)?  y
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  $ echo y | hg --config ui.interactive=yes debuglock --set-lock
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  abort: lock is already held
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
  [255]
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
  $ touch $TESTTMP/transaction-continue
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
  $ wait
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
  $ hg phase --rev 0
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
  0: draft
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
  $ cat ../log.err
34ab5c7b7f98 transaction: the base of a new test file checking transaction abort issue
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
  abort: pretxnclose.test hook exited with status 1
50170
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   138
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   139
Actual testing
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   140
==============
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   141
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   142
Changing tracked file
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   143
---------------------
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   144
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   145
  $ hg status
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   146
  $ hg phase --public --rev 0 2> ../log.err &
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   147
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   148
  $ hg forget default_a
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   149
  $ hg status
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   150
  R default_a
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   151
  $ touch $TESTTMP/transaction-continue
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   152
  $ wait
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   153
  $ hg status
50174
596a6b9b0570 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50173
diff changeset
   154
  R default_a
50170
a9a13b160db9 transaction: tests we don't overwrite tracking to changed file on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50169
diff changeset
   155
  $ hg revert --all --quiet
50171
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   156
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   157
Changing branch from default
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   158
----------------------------
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   159
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   160
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   161
  default
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   162
  $ hg phase --public --rev 0 2> ../log.err &
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   163
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   164
  $ hg branch celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   165
  marked working directory as branch celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   166
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   167
  celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   168
  $ touch $TESTTMP/transaction-continue
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   169
  $ wait
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   170
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   171
  celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   172
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   173
Changing branch from another one
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   174
--------------------------------
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   175
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   176
  $ hg up babar --quiet
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   177
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   178
  babar
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   179
  $ hg phase --public --rev 0 2> ../log.err &
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   180
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   181
  $ hg branch celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   182
  marked working directory as branch celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   183
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   184
  celeste
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   185
  $ touch $TESTTMP/transaction-continue
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   186
  $ wait
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   187
  $ hg branch
d956ceed3289 transaction: tests we don't overwrite branch changes on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50170
diff changeset
   188
  celeste
50172
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   189
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   190
updating working copy
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   191
---------------------
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   192
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   193
  $ hg st
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   194
  $ hg log --rev . -T '{desc}\n'
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   195
  babar_m
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   196
  $ hg phase --public --rev 0 2> ../log.err &
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   197
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   198
  $ hg update "parents(.)" --quiet
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   199
  $ hg log --rev . -T '{desc}\n'
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   200
  babar_l
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   201
  $ hg st
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   202
  $ touch $TESTTMP/transaction-continue
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   203
  $ wait
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   204
  $ hg log --rev . -T '{desc}\n'
50174
596a6b9b0570 branching: merge stable into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50173
diff changeset
   205
  babar_l
50172
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   206
  $ hg st
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   207
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   208
  $ hg purge --no-confirm
b90899794ced transaction: tests we don't overwrite updates on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50171
diff changeset
   209
  $ hg up --quiet babar
50173
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   210
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   211
Activating a bookmark
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   212
---------------------
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   213
(without going through the bookmark command)
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   214
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   215
Show the activation/desactivation pattern that exist without taking the store
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   216
lock.
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   217
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   218
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   219
  =  =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   220
  $ hg up bar
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   221
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   222
  (activating bookmark bar)
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   223
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   224
  = bar =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   225
  $ hg up .
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   226
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   227
  (leaving bookmark bar)
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   228
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   229
  =  =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   230
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   231
Activating the bookmark during a transaction
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   232
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   233
  $ hg up . --quiet
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   234
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   235
  =  =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   236
  $ hg phase --public --rev 0 2> ../log.err &
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   237
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   238
  $ hg up bar
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   239
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   240
  (activating bookmark bar)
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   241
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   242
  = bar =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   243
  $ touch $TESTTMP/transaction-continue
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   244
  $ wait
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   245
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   246
  = bar =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   247
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   248
Deactivating the bookmark
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   249
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   250
  $ hg up bar --quiet
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   251
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   252
  = bar =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   253
  $ hg phase --public --rev 0 2> ../log.err &
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   254
  $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/transaction-waiting
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   255
  $ hg up .
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   256
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   257
  (leaving bookmark bar)
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   258
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   259
  =  =
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   260
  $ touch $TESTTMP/transaction-continue
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   261
  $ wait
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   262
  $ hg log -r . -T '= {activebookmark} =\n'
bf27727e6c78 transaction: tests we don't overwrite bookmark activation on abort
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50172
diff changeset
   263
  =  =