tests/test-obsolete.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 13 Sep 2011 22:05:19 +0200
changeset 75 d7b11772f0b5
parent 52 62bdc2567099
child 79 9906560f585e
permissions -rw-r--r--
[obsolete] published changeset can't be obsoleted states extension is now required. A warning message is emitted when obsoleting a published changeset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
  > [web]
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
  > push_ssl = false
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     4
  > allow_push = *
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
  > [extensions]
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
  > EOF
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
     7
  $ echo "states=$(echo $(dirname $TESTDIR))/hgext/states.py" >> $HGRCPATH
51
d98e06ab8320 move extensions in a hgext directory
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 50
diff changeset
     8
  $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     9
  $ mkcommit() {
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
  >    echo "$1" > "$1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
  >    hg add "$1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
  >    hg ci -m "add $1"
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
  > }
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    15
  $ alias qlog="hg log --template='{rev}\n- {node|short}\n'"
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    16
  $ hg init local
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    17
  $ cd local
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
    18
  $ hg states ready # XXX should be put in default config when state support it
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
  $ mkcommit a # 0
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
    20
  $ hg published 0
32
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
  $ mkcommit b # 1
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
  $ mkcommit c # 2
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
  $ hg up 1
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
  $ mkcommit obsol_c # 3
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
  created new head
c27491be4431 obsolet: basic support (hide changeset)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
  $ hg debugobsolete 3 2
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    28
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    29
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    30
Test that obsolete changeset are hidden
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    31
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    32
  $ qlog
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    33
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    34
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    35
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    36
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    37
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    38
  - 1f0dee641bb7
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    39
  $ qlog --hidden
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    40
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    41
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    42
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    43
  - 4538525df7e2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    44
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    45
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    46
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    47
  - 1f0dee641bb7
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    48
  $ qlog -r 'obsolete()' --hidden
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    49
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    50
  - 4538525df7e2
39
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 32
diff changeset
    51
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    52
test obsolete changeset with no-obsolete descendant
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    53
  $ hg up 1 -q
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    54
  $ mkcommit "obsol_c'" # 4 (on 1)
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    55
  created new head
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    56
  $ hg debugobsolete 4 3
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    57
  $ qlog
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    58
  4
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    59
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    60
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    61
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    62
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    63
  - 1f0dee641bb7
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    64
  $ qlog -r 'obsolete()' --hidden
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    65
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    66
  - 4538525df7e2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    67
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    68
  - 0d3f46688ccc
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    69
  $ hg up 3 -q
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    70
  $ mkcommit d # 5 (on 3)
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    71
  $ qlog -r 'obsolete()'
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    72
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    73
  - 0d3f46688ccc
40
b9a5a596d9ef proper computation of hidden changeset.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 39
diff changeset
    74
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    75
Test communication of obsolete relation with a compatible client
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    76
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    77
  $ hg init ../other-new
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
    78
  $ hg -R ../other-new states ready # XXX should be put in default config when state support it
46
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
    79
  $ hg push --traceback ../other-new
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    80
  pushing to ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    81
  searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    82
  adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    83
  adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
    84
  adding file changes
46
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
    85
  added 5 changesets with 5 changes to 5 files (+1 heads)
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    86
  $ qlog -R ../other-new -r 'obsolete()'
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    87
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    88
  - 0d3f46688ccc
45
d89453a10991 include hash in test.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 44
diff changeset
    89
  $ qlog -R ../other-new
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    90
  4
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    91
  - a7a6f2b5d8a5
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    92
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    93
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    94
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    95
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    96
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    97
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    98
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
    99
  - 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   100
  $ hg up 3 -q
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   101
  $ mkcommit obsol_d # 6
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   102
  created new head
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   103
  $ hg debugobsolete 6 5
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   104
  $ qlog
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   105
  6
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   106
  - 95de7fc6918d
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   107
  4
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   108
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   109
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   110
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   111
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   112
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   113
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   114
  - 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   115
  $ qlog -r 'obsolete()'
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   116
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   117
  - 0d3f46688ccc
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   118
  $ hg push ../other-new -f # XXX should not have to use -f
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   119
  pushing to ../other-new
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   120
  searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   121
  adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   122
  adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   123
  adding file changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   124
  added 1 changesets with 1 changes to 1 files (+1 heads)
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   125
  $ qlog -R ../other-new
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   126
  5
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   127
  - 95de7fc6918d
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   128
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   129
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   130
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   131
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   132
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   133
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   134
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   135
  - 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   136
  $ qlog -R ../other-new -r 'obsolete()'
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   137
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   138
  - 0d3f46688ccc
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   139
  $ hg up -q .^
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   140
  $ mkcommit "obsol_d'" # 7
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   141
  created new head
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   142
  $ hg debugobsolete 7 6
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   143
  $ hg pull -R ../other-new .
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   144
  pulling from .
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   145
  searching for changes
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   146
  adding changesets
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   147
  adding manifests
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   148
  adding file changes
46
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   149
  added 2 changesets with 2 changes to 2 files (+2 heads)
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   150
  (run 'hg heads .' to see heads, 'hg merge' to merge)
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   151
  $ qlog -R ../other-new
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   152
  7
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   153
  - 909a0fb57e5d
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   154
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   155
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   156
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   157
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   158
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   159
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   160
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   161
  - 1f0dee641bb7
46
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   162
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   163
pushing to stuff that doesn't support obsolete
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   164
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   165
  $ hg init ../other-old
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   166
  > # XXX I don't like this but changeset get published otherwise
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   167
  > # remove it when we will get a --keep-state flag for push
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   168
  $ hg -R ../other-old states ready
46
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   169
  $ echo '[extensions]'  > ../other-old/.hg/hgrc
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   170
  $ echo "obsolete=!$(echo $(dirname $TESTDIR))/obsolete.py" >> ../other-old/.hg/hgrc
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   171
  $ hg push ../other-old
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   172
  pushing to ../other-old
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   173
  searching for changes
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   174
  adding changesets
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   175
  adding manifests
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   176
  adding file changes
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   177
  added 5 changesets with 5 changes to 5 files (+1 heads)
3b0364fc822f Do not propagate obsolete changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 45
diff changeset
   178
  $ qlog -R ../other-old
49
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   179
  4
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   180
  - 909a0fb57e5d
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   181
  3
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   182
  - 725c380fe99b
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   183
  2
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   184
  - 0d3f46688ccc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   185
  1
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   186
  - 7c3bad9141dc
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   187
  0
4e804af47e57 Change test output again
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 46
diff changeset
   188
  - 1f0dee641bb7
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   189
50
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   190
clone support
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   191
50
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   192
  $ hg clone . ../cloned
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   193
  > # The warning should go away once we have default value to set ready before we pull
50
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   194
  requesting all changes
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   195
  adding changesets
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   196
  adding manifests
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   197
  adding file changes
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   198
  added 8 changesets with 8 changes to 8 files (+4 heads)
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   199
  909a0fb57e5d try to obsolete immutable changeset 95de7fc6918d
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   200
  95de7fc6918d try to obsolete immutable changeset a7a6f2b5d8a5
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   201
  725c380fe99b try to obsolete immutable changeset 0d3f46688ccc
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   202
  0d3f46688ccc try to obsolete immutable changeset 4538525df7e2
50
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   203
  updating to branch default
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   204
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
44
b243c10a5fbe Add pushkey support for pull and push
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 40
diff changeset
   205
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   206
  $ hg -R ../cloned states ready # XXX should be put in default config when state support it
50
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   207
  $ qlog -R ../cloned
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   208
  7
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   209
  - 909a0fb57e5d
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   210
  4
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   211
  - 725c380fe99b
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   212
  3
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   213
  - 0d3f46688ccc
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   214
  1
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   215
  - 7c3bad9141dc
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   216
  0
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   217
  - 1f0dee641bb7
19b22ad56b32 clone support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 49
diff changeset
   218
52
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   219
Test rollback support
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   220
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   221
  $ hg up .^ -q
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   222
  $ mkcommit "obsol_d''"
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   223
  created new head
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   224
  $ hg debugobsolete 8 7
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   225
  $ hg -R ../other-new pull .
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   226
  pulling from .
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   227
  searching for changes
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   228
  adding changesets
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   229
  adding manifests
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   230
  adding file changes
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   231
  added 1 changesets with 1 changes to 1 files (+1 heads)
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   232
  (run 'hg heads .' to see heads, 'hg merge' to merge)
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   233
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   234
  $ qlog -R ../other-new
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   235
  8
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   236
  - 159dfc9fa5d3
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   237
  3
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   238
  - 725c380fe99b
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   239
  2
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   240
  - 0d3f46688ccc
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   241
  1
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   242
  - 7c3bad9141dc
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   243
  0
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   244
  - 1f0dee641bb7
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   245
  $ hg -R ../other-new rollback
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   246
  repository tip rolled back to revision 7 (undo pull)
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   247
  working directory now based on revision -1
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   248
  $ qlog -R ../other-new
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   249
  7
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   250
  - 909a0fb57e5d
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   251
  3
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   252
  - 725c380fe99b
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   253
  2
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   254
  - 0d3f46688ccc
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   255
  1
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   256
  - 7c3bad9141dc
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   257
  0
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   258
  - 1f0dee641bb7
62bdc2567099 Rollback support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 51
diff changeset
   259
75
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   260
obsolete published changeset
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   261
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   262
  $ hg up null
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   263
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   264
  $ mkcommit toto # 8
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   265
  created new head
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   266
  $ hg debugobsolete 8 0
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   267
  159dfc9fa5d3 try to obsolete immutable changeset 1f0dee641bb7
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   268
  $ qlog -r 'obsolete()'
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   269
  3
d7b11772f0b5 [obsolete] published changeset can't be obsoleted
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 52
diff changeset
   270
  - 0d3f46688ccc