tests/test-touch.t
author Sushil khanchi <sushilkhanchi97@gmail.com>
Mon, 04 Nov 2019 01:30:50 +0530
changeset 5079 1f92a6aa40d6
parent 4729 076b6813a7ea
child 5134 d9b1336f7d1c
child 5236 6c0797ec50b6
permissions -rw-r--r--
evolve: add pre-check logic for content-divergence in rewriteutil.precheck() For now, pre-check will abort if rewriting a rev create divergence (and config experimental.evolution.allowdivergence is not set to True). But this behaviour can be improved where instead of abort maybe we can confirm the user to either proceed with divergence or some other options depends on what command user is running. Changes in test file are used to overrides the pre-check for testing purpose (using experimental.evolution.allowdivergence=yes).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
  > [ui]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
  > logtemplate={rev}:{node|short} {desc}\n
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
  > [defaults]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
  > amend=-d "0 0"
4709
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
     7
  > [alias]
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
     8
  > glog = log -GT "{rev}: {desc}"
5079
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4729
diff changeset
     9
  > [experimental]
1f92a6aa40d6 evolve: add pre-check logic for content-divergence in rewriteutil.precheck()
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4729
diff changeset
    10
  > evolution.allowdivergence = True
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
  > [extensions]
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
  > hgext.rebase=
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1756
diff changeset
    14
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
  $ hg init repo
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
  $ cd repo
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
  $ echo A > a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
  $ hg add a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
  $ hg commit -m a
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
Basic usage
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    25
  @  0:[0-9a-f]{12} a (re)
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
  
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
  $ hg touch .
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
  $ hg log -G
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
  @  1:[0-9a-f]{12} a (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
  
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
Revive usage
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
  $ echo A > b
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
  $ hg add b
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    37
  $ hg commit -m ab --amend
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
  $ hg up --hidden 1
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3568
diff changeset
    39
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3568
diff changeset
    40
  updated to hidden changeset * (glob)
3432
f57be161f34b test: update with new 'update' hint about obsfate
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3417
diff changeset
    41
  (hidden revision '*' was rewritten as: *) (glob)
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    42
  working directory parent is obsolete! (*) (glob)
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    43
  (use 'hg evolve' to update to its successor: *) (glob)
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    45
  o  2:[0-9a-f]{12} ab (re)
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
  
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
  @  1:[0-9a-f]{12} a (re)
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
  
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
  $ hg touch .
1589
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
    50
  [1] a
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
    51
  reviving this changeset will create divergence unless you make a duplicate.
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
    52
  (a)llow divergence or (d)uplicate the changeset?  a
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    53
  2 new content-divergent changesets
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    55
  @  3:[0-9a-f]{12} a (re)
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3411
diff changeset
    57
  \*  2:[0-9a-f]{12} ab (re)
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    59
  $ hg prune 3
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    60
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4613
30a544904238 messages: standardize on "working copy is now at" including "is"
Martin von Zweigbergk <martinvonz@google.com>
parents: 4446
diff changeset
    61
  working directory is now at 000000000000
700
ebcfd72e7609 touch: add basic testing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  1 changesets pruned
701
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    63
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    64
Duplicate
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    65
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    66
  $ hg touch --duplicate .
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    67
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    68
  @  4:[0-9a-f]{12} (re)
701
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    69
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    70
  o  2:[0-9a-f]{12} ab (re)
701
f752089479ce add a duplicate option in touch
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 700
diff changeset
    71
  
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    72
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    73
Multiple touch
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    74
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    75
  $ echo C > c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    76
  $ hg add c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    77
  $ hg commit -m c
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    78
  $ echo D > d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    79
  $ hg add d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    80
  $ hg commit -m d
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    81
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    82
  @  6:[0-9a-f]{12} d (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    83
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    84
  o  5:[0-9a-f]{12} c (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    85
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    86
  o  4:[0-9a-f]{12} (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    87
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    88
  o  2:[0-9a-f]{12} ab (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    89
  
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
    90
  $ hg touch .^:.
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    91
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    92
  @  8:[0-9a-f]{12} d (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    93
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    94
  o  7:[0-9a-f]{12} c (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    95
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    96
  o  4:[0-9a-f]{12} (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    97
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    98
  o  2:[0-9a-f]{12} ab (re)
702
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
    99
  
b5a85a8909d3 touch: properly handle touching multiple changeset
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 701
diff changeset
   100
1151
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   101
check move data kept after rebase on touch:
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   102
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   103
  $ touch gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   104
  $ hg commit -Am gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   105
  adding gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   106
  $ hg mv gna1 gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   107
  $ hg commit -m move
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   108
  $ hg st -C --change=tip
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   109
  A gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   110
    gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   111
  R gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   112
  $ hg up .^
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   113
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   114
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   115
  $ hg touch
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   116
  1 new orphan changesets
1151
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   117
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   118
  $ hg log -G --hidden
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   119
  @  11:[0-9a-f]{12} gna1 (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   120
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3411
diff changeset
   121
  . \*  10:[0-9a-f]{12} move (re)
3000
bd7e8be29542 branching: merge future 6.7.0 in the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2929
diff changeset
   122
  | |
3210
df8d535216af tests: fix previously accidentally matching regexes in test-touch.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
   123
  . x  9:[0-9a-f]{12} gna1 (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   124
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   125
  o  8:[0-9a-f]{12} d (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   126
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   127
  o  7:[0-9a-f]{12} c (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   128
  |
3210
df8d535216af tests: fix previously accidentally matching regexes in test-touch.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
   129
  . x  6:[0-9a-f]{12} d (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   130
  | |
3210
df8d535216af tests: fix previously accidentally matching regexes in test-touch.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 3013
diff changeset
   131
  . x  5:[0-9a-f]{12} c (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   132
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   133
  o  4:[0-9a-f]{12} (re)
3000
bd7e8be29542 branching: merge future 6.7.0 in the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2929
diff changeset
   134
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   135
  x  3:[0-9a-f]{12} a (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   136
  
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   137
  o  2:[0-9a-f]{12} ab (re)
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   138
  
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   139
  x  1:[0-9a-f]{12} a (re)
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   140
  
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   141
  x  0:[0-9a-f]{12} a (re)
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   142
  
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2858
diff changeset
   143
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   144
  $ hg rebase -s 10 -d 11
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   145
  rebasing 10:[0-9a-f]{12} "move" (re)
1151
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   146
  $ hg st -C --change=tip
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   147
  A gna2
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   148
    gna1
802a87359017 test-touch: add a test for rename preservation after touch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 743
diff changeset
   149
  R gna1
1589
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   150
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   151
check that the --duplicate option does not create divergence
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   152
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   153
  $ hg touch --duplicate 10 --hidden
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   154
  1 new orphan changesets
1589
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   155
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   156
check that reviving a changeset with no successor does not show the prompt
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   157
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   158
  $ hg prune 13
1589
d6630a6bff86 touch: prompt the user for what to do with the revived changeset
Laurent Charignon <lcharignon@fb.com>
parents: 1443
diff changeset
   159
  1 changesets pruned
3215
175b524b9a2b touch: add support for storing a note in obsmarker
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3210
diff changeset
   160
  $ hg touch 13 --hidden --note "testing with no successor"
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   161
  1 new orphan changesets
3215
175b524b9a2b touch: add support for storing a note in obsmarker
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3210
diff changeset
   162
  $ hg obslog -r 13 --hidden
175b524b9a2b touch: add support for storing a note in obsmarker
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3210
diff changeset
   163
  x  [0-9a-f]{12} (.*) move (re)
3566
e6bea259c227 prune: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3432
diff changeset
   164
       pruned using prune by test (Thu Jan 01 00:00:00 1970 +0000)
3568
eca57332ad03 touch: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3566
diff changeset
   165
       rewritten(.*) as [0-9a-f]{12} using touch by test (.*) (re)
3223
73b4e84df0bd obsnote: don't add '' to note while showing it in obslog
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3215
diff changeset
   166
         note: testing with no successor
3215
175b524b9a2b touch: add support for storing a note in obsmarker
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3210
diff changeset
   167
  
4446
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   168
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   169
Public phase
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   170
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   171
  $ hg phase --public -r 2
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   172
  $ hg touch 2
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   173
  abort: cannot touch public changesets: * (glob)
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   174
  (see 'hg help phases' for details)
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   175
  [255]
8232bddf543a touch: use action "touch", not "<function touch at ...>", in precheck
Martin von Zweigbergk <martinvonz@google.com>
parents: 3747
diff changeset
   176
  $ hg touch --duplicate 2
4727
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   177
4709
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   178
Reviving merge commit
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   179
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   180
  $ hg up 12
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   181
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   182
  $ hg merge 15
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   183
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   184
  (branch merge, don't forget to commit)
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   185
  $ hg ci -m merge
4721
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   186
  $ hg st --change .
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   187
  A a
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   188
  A b
4709
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   189
  $ hg prune -r .
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   190
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   191
  working directory is now at * (glob)
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   192
  1 changesets pruned
cc3569da7150 tests: show what happens when trying to hg touch a merge commit
Anton Shestakov <av6@dwimlabs.net>
parents: 4613
diff changeset
   193
  $ hg touch 16 --hidden
4710
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   194
  $ hg glog -r '12+15+17'
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   195
  o    17: merge
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   196
  |\
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   197
  | o  15: ab
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   198
  |
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   199
  @  12: move
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   200
  |
0e0731406efd rewriteutil: allow rewriting merge commits (issue4561)
Anton Shestakov <av6@dwimlabs.net>
parents: 4709
diff changeset
   201
  ~
4721
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   202
  $ hg st --change 17
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   203
  A a
b69497b23d31 touch: make sure merge commits include files from p1 and p2
Anton Shestakov <av6@dwimlabs.net>
parents: 4710
diff changeset
   204
  A b
4729
076b6813a7ea branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4721 4728
diff changeset
   205
4727
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   206
  $ cd ..
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   207
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   208
Make sure touch doesn't fail to warn about divergence (issue6107)
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   209
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   210
  $ hg init touchdiv
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   211
  $ cd touchdiv
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   212
  $ echo c > c
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   213
  $ hg add c
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   214
  $ hg ci -m "added c"
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   215
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   216
  $ hg amend -m "modified c"
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   217
  $ hg prune . -q
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   218
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   219
  $ hg touch -r "desc('added c')" --hidden
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   220
  $ hg touch -r "desc('modified c')" --hidden
4728
ef8907df73fc touch: fix the inconsistent behavior of divergence catching logic (issue6107)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4727
diff changeset
   221
  [1] modified c
ef8907df73fc touch: fix the inconsistent behavior of divergence catching logic (issue6107)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4727
diff changeset
   222
  reviving this changeset will create divergence unless you make a duplicate.
ef8907df73fc touch: fix the inconsistent behavior of divergence catching logic (issue6107)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4727
diff changeset
   223
  (a)llow divergence or (d)uplicate the changeset?  a
4727
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   224
  2 new content-divergent changesets
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   225
355b8e17e14c touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4613
diff changeset
   226
  $ cd ..