tests/test-obsolete.t
author Adrian Buehlmann <adrian@cadifra.com>
Mon, 16 Jul 2012 22:37:44 +0200
changeset 17195 48c232873a54
parent 17173 c621f84dbb35
child 17206 70ebb4bd8083
permissions -rw-r--r--
obsolete: add seek to end of file before calling tell (issue3543)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17171
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     1
  $ cat >> $HGRCPATH << EOF
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     2
  > [extensions]
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     3
  > graphlog=
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     4
  > [phases]
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     5
  > # public changeset are not obsolete
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     6
  > publish=false
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
     7
  > EOF
17071
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
     8
  $ mkcommit() {
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
     9
  >    echo "$1" > "$1"
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    10
  >    hg add "$1"
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    11
  >    hg ci -m "add $1"
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    12
  > }
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    13
  $ getid() {
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    14
  >    hg id --debug -ir "desc('$1')"
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    15
  > }
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    16
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    17
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    18
  $ hg init tmpa
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    19
  $ cd tmpa
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    20
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    21
Killing a single changeset without replacement
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    22
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    23
  $ mkcommit kill_me
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    24
  $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
17074
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    25
  $ hg debugobsolete
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    26
  97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
17071
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    27
  $ cd ..
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    28
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    29
Killing a single changeset with replacement
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    30
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    31
  $ hg init tmpb
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    32
  $ cd tmpb
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    33
  $ mkcommit a
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    34
  $ mkcommit b
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    35
  $ mkcommit original_c
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    36
  $ hg up "desc('b')"
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    37
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    38
  $ mkcommit new_c
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    39
  created new head
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    40
  $ hg debugobsolete `getid original_c`  `getid new_c` -d '56 12'
17074
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    41
  $ hg debugobsolete
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    42
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17071
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    43
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    44
do it again (it read the obsstore before adding new changeset)
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    45
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    46
  $ hg up '.^'
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    47
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    48
  $ mkcommit new_2_c
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    49
  created new head
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    50
  $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
17074
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    51
  $ hg debugobsolete
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    52
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    53
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17071
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    54
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    55
Register two markers with a missing node
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    56
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    57
  $ hg up '.^'
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    58
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    59
  $ mkcommit new_3_c
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    60
  created new head
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    61
  $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
11f26e2669aa command: creation of obsolete marker
Pierre-Yves.David@ens-lyon.org
parents:
diff changeset
    62
  $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
17074
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    63
  $ hg debugobsolete
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    64
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    65
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    66
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
178a2e85d426 debugobsolete: list all obsolete marker if no argument are specified
Pierre-Yves.David@ens-lyon.org
parents: 17071
diff changeset
    67
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
    68
17119
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    69
Check that graphlog detect that a changeset is obsolete:
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    70
17171
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
    71
  $ hg glog
17119
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    72
  @  changeset:   5:5601fb93a350
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    73
  |  tag:         tip
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    74
  |  parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    75
  |  user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    76
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    77
  |  summary:     add new_3_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    78
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    79
  | x  changeset:   4:ca819180edb9
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    80
  |/   parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    81
  |    user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    82
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    83
  |    summary:     add new_2_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    84
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    85
  | x  changeset:   3:cdbce2fbb163
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    86
  |/   parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    87
  |    user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    88
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    89
  |    summary:     add new_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    90
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    91
  | x  changeset:   2:245bde4270cd
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    92
  |/   user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    93
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    94
  |    summary:     add original_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    95
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    96
  o  changeset:   1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    97
  |  user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    98
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
    99
  |  summary:     add b
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   100
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   101
  o  changeset:   0:1f0dee641bb7
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   102
     user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   103
     date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   104
     summary:     add a
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   105
  
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   106
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   107
Check that public changeset are not accounted as obsolete:
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   108
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   109
  $ hg phase --public 2
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   110
  $ hg --config 'extensions.graphlog=' glog
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   111
  @  changeset:   5:5601fb93a350
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   112
  |  tag:         tip
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   113
  |  parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   114
  |  user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   115
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   116
  |  summary:     add new_3_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   117
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   118
  | x  changeset:   4:ca819180edb9
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   119
  |/   parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   120
  |    user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   121
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   122
  |    summary:     add new_2_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   123
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   124
  | x  changeset:   3:cdbce2fbb163
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   125
  |/   parent:      1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   126
  |    user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   127
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   128
  |    summary:     add new_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   129
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   130
  | o  changeset:   2:245bde4270cd
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   131
  |/   user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   132
  |    date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   133
  |    summary:     add original_c
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   134
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   135
  o  changeset:   1:7c3bad9141dc
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   136
  |  user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   137
  |  date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   138
  |  summary:     add b
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   139
  |
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   140
  o  changeset:   0:1f0dee641bb7
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   141
     user:        test
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   142
     date:        Thu Jan 01 00:00:00 1970 +0000
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   143
     summary:     add a
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   144
  
2e13c1bd34dc graphlog: display obsolete changeset as "x"
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17075
diff changeset
   145
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   146
  $ cd ..
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   147
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   148
Exchange Test
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   149
============================
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   150
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   151
Destination repo does not have any data
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   152
---------------------------------------
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   153
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   154
Try to pull markers
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   155
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   156
  $ hg init tmpc
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   157
  $ cd tmpc
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   158
  $ hg pull ../tmpb
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   159
  pulling from ../tmpb
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   160
  requesting all changes
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   161
  adding changesets
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   162
  adding manifests
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   163
  adding file changes
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   164
  added 6 changesets with 6 changes to 6 files (+3 heads)
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   165
  (run 'hg heads' to see heads, 'hg merge' to merge)
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   166
  $ hg debugobsolete
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   167
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   168
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   169
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   170
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   171
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   172
Rollback//Transaction support
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   173
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   174
  $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   175
  $ hg debugobsolete
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   176
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   177
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   178
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   179
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   180
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 {'date': '1340 0', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   181
  $ hg rollback -n
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   182
  repository tip rolled back to revision 5 (undo debugobsolete)
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   183
  $ hg rollback
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   184
  repository tip rolled back to revision 5 (undo debugobsolete)
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   185
  $ hg debugobsolete
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   186
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   187
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   188
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   189
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   190
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   191
  $ cd ..
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   192
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   193
Try to pull markers
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   194
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   195
  $ hg init tmpd
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   196
  $ hg -R tmpb push tmpd
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   197
  pushing to tmpd
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   198
  searching for changes
17172
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   199
  abort: push includes an obsolete changeset: ca819180edb9!
17169
c18ecebed3f1 push: refuse to push obsolete changesets
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17126
diff changeset
   200
  [255]
c18ecebed3f1 push: refuse to push obsolete changesets
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17126
diff changeset
   201
  $ hg -R tmpd debugobsolete
17170
63a4a3871607 revset: add an `obsolete` symbol
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17169
diff changeset
   202
  $ hg -R tmpb push tmpd --rev 'not obsolete()'
17169
c18ecebed3f1 push: refuse to push obsolete changesets
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17126
diff changeset
   203
  pushing to tmpd
c18ecebed3f1 push: refuse to push obsolete changesets
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17126
diff changeset
   204
  searching for changes
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   205
  adding changesets
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   206
  adding manifests
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   207
  adding file changes
17169
c18ecebed3f1 push: refuse to push obsolete changesets
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17126
diff changeset
   208
  added 4 changesets with 4 changes to 4 files (+1 heads)
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   209
  $ hg -R tmpd debugobsolete
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   210
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   211
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   212
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   213
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   214
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   215
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   216
Destination repo have existing data
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   217
---------------------------------------
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   218
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   219
On pull
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   220
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   221
  $ hg init tmpe
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   222
  $ cd tmpe
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   223
  $ hg debugobsolete -d '1339 0' 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   224
  $ hg pull ../tmpb
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   225
  pulling from ../tmpb
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   226
  requesting all changes
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   227
  adding changesets
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   228
  adding manifests
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   229
  adding file changes
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   230
  added 6 changesets with 6 changes to 6 files (+3 heads)
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   231
  (run 'hg heads' to see heads, 'hg merge' to merge)
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   232
  $ hg debugobsolete
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   233
  2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   234
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   235
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   236
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   237
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   238
17171
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   239
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   240
On push
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   241
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   242
  $ hg push ../tmpc
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   243
  pushing to ../tmpc
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   244
  searching for changes
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   245
  no changes found
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   246
  [1]
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   247
  $ hg -R ../tmpc debugobsolete
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   248
  245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   249
  cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
17126
8fa8717b47b6 obsolete: write obsolete marker inside a transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17119
diff changeset
   250
  ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
17075
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   251
  1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
28ed1c4511ce obsolete: exchange obsolete marker over pushkey
Pierre-Yves.David@ens-lyon.org
parents: 17074
diff changeset
   252
  2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
17171
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   253
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   254
detect outgoing obsolete and unstable
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   255
---------------------------------------
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   256
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   257
  $ hg glog
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   258
  o  changeset:   5:5601fb93a350
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   259
  |  tag:         tip
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   260
  |  parent:      1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   261
  |  user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   262
  |  date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   263
  |  summary:     add new_3_c
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   264
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   265
  | x  changeset:   4:ca819180edb9
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   266
  |/   parent:      1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   267
  |    user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   268
  |    date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   269
  |    summary:     add new_2_c
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   270
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   271
  | x  changeset:   3:cdbce2fbb163
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   272
  |/   parent:      1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   273
  |    user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   274
  |    date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   275
  |    summary:     add new_c
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   276
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   277
  | o  changeset:   2:245bde4270cd
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   278
  |/   user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   279
  |    date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   280
  |    summary:     add original_c
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   281
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   282
  o  changeset:   1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   283
  |  user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   284
  |  date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   285
  |  summary:     add b
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   286
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   287
  o  changeset:   0:1f0dee641bb7
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   288
     user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   289
     date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   290
     summary:     add a
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   291
  
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   292
  $ hg up -q 'desc("new_2_c")'
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   293
  $ mkcommit original_d
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   294
  $ hg glog -r '::unstable()'
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   295
  @  changeset:   6:7878242aeece
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   296
  |  tag:         tip
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   297
  |  parent:      4:ca819180edb9
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   298
  |  user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   299
  |  date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   300
  |  summary:     add original_d
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   301
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   302
  x  changeset:   4:ca819180edb9
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   303
  |  parent:      1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   304
  |  user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   305
  |  date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   306
  |  summary:     add new_2_c
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   307
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   308
  o  changeset:   1:7c3bad9141dc
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   309
  |  user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   310
  |  date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   311
  |  summary:     add b
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   312
  |
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   313
  o  changeset:   0:1f0dee641bb7
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   314
     user:        test
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   315
     date:        Thu Jan 01 00:00:00 1970 +0000
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   316
     summary:     add a
9c750c3e4fac obsolete: compute unstable changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17170
diff changeset
   317
  
17172
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   318
  $ hg push ../tmpc/
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   319
  pushing to ../tmpc/
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   320
  searching for changes
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   321
  abort: push includes an unstable changeset: 7878242aeece!
12fdaa30063a push: refuse to push unstable changesets without force
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17171
diff changeset
   322
  [255]
17173
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   323
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   324
Test that extinct changeset are properly detected
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   325
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   326
  $ hg log -r 'extinct()'
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   327
  changeset:   3:cdbce2fbb163
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   328
  parent:      1:7c3bad9141dc
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   329
  user:        test
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   330
  date:        Thu Jan 01 00:00:00 1970 +0000
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   331
  summary:     add new_c
c621f84dbb35 obsolete: compute extinct changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 17172
diff changeset
   332