tests/test-evolve-obshistory-phase-divergent.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Aug 2018 02:47:44 +0200
branchmercurial-4.4
changeset 3930 d00f0c369bc7
parent 3924 f3713d41b85b
child 3936 537fd9a86c06
child 4363 a2fdbece7ce1
permissions -rw-r--r--
test-compat: merge mercurial-4.5 into mercurial-4.4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     1
This test file test the various messages when accessing obsolete
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     2
revisions.
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     3
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     4
Global setup
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     5
============
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     6
3885
3df8b6ecce2a tests: extract obshistory setup in a separate file
Boris Feld <boris.feld@octobus.net>
parents: 3884
diff changeset
     7
  $ . $TESTDIR/testlib/obshistory_setup.sh
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     8
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
     9
Test output with phase-divergence
3891
11b775fddda8 tests: extract the content-divergence test case into a separate file
Boris Feld <boris.feld@octobus.net>
parents: 3890
diff changeset
    10
===================================
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    11
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    12
Test setup
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    13
----------
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    14
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    15
  $ hg init $TESTTMP/phase-divergence
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    16
  $ cd $TESTTMP/phase-divergence
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    17
  $ mkcommit ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    18
  $ mkcommit A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    19
  $ hg amend -m "A1"
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    20
  $ hg log --hidden -G
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    21
  @  changeset:   2:fdf9bde5129a
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    22
  |  tag:         tip
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    23
  |  parent:      0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    24
  |  user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    25
  |  date:        Thu Jan 01 00:00:00 1970 +0000
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    26
  |  summary:     A1
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    27
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    28
  | x  changeset:   1:471f378eab4c
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    29
  |/   user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    30
  |    date:        Thu Jan 01 00:00:00 1970 +0000
3115
663dbef40f97 obsfate: re-enables operation display in obsfate
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3083
diff changeset
    31
  |    obsolete:    reworded using amend as 2:fdf9bde5129a
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    32
  |    summary:     A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    33
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    34
  o  changeset:   0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    35
     user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    36
     date:        Thu Jan 01 00:00:00 1970 +0000
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    37
     summary:     ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    38
  
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    39
  $ hg update --hidden 'desc(A0)'
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
    40
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    41
  working directory parent is obsolete! (471f378eab4c)
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    42
  (use 'hg evolve' to update to its successor: fdf9bde5129a)
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    43
  $ hg phase -p .
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    44
  1 new phase-divergent changesets
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    45
  $ hg log --hidden -G
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
    46
  o  changeset:   2:fdf9bde5129a
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    47
  |  tag:         tip
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    48
  |  parent:      0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    49
  |  user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    50
  |  date:        Thu Jan 01 00:00:00 1970 +0000
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    51
  |  instability: phase-divergent
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    52
  |  summary:     A1
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    53
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    54
  | @  changeset:   1:471f378eab4c
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    55
  |/   user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    56
  |    date:        Thu Jan 01 00:00:00 1970 +0000
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    57
  |    summary:     A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    58
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    59
  o  changeset:   0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    60
     user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    61
     date:        Thu Jan 01 00:00:00 1970 +0000
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    62
     summary:     ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    63
  
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    64
Actual test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    65
-----------
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    66
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    67
Check that debugobshistory on the divergent revision show both destinations
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
    68
  $ hg obslog --hidden 471f378eab4c --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    69
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
    70
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    71
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    72
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    73
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    74
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    75
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    76
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    77
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    78
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
    79
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
    80
Check that with all option, every changeset is shown
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
    81
  $ hg obslog --hidden --all 471f378eab4c --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
    82
  o  fdf9bde5129a (2) A1
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
    83
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    84
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
    85
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    86
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    87
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    88
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    89
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    90
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    91
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    92
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
    93
  
2477
d7f7e8f3b51c test: rename all olog references
Boris Feld <boris.feld@octobus.net>
parents: 2476
diff changeset
    94
  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
    95
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
    96
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
    97
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
    98
              {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
    99
                  "date": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   100
                      *, (glob)
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   101
                      0 (glob)
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   102
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   103
                  "effect": [
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   104
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   105
                  ],
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3432
diff changeset
   106
                  "operation": "amend",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   107
                  "succnodes": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   108
                      "fdf9bde5129a"
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   109
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   110
                  "user": "test",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   111
                  "verb": "rewritten"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   112
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   113
          ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   114
          "node": "471f378eab4c",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   115
          "rev": 1,
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   116
          "shortdescription": "A0"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   117
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   118
  ]
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   119
Check that debugobshistory on the first diverged revision show the revision
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   120
and the diverent one
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   121
  $ hg obslog fdf9bde5129a --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
   122
  o  fdf9bde5129a (2) A1
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   123
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   124
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   125
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   126
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   127
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   128
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   129
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   130
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   131
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   132
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   133
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   134
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   135
Check that all option show all of them
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   136
  $ hg obslog fdf9bde5129a -a --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
   137
  o  fdf9bde5129a (2) A1
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   138
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   139
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   140
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   141
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   142
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   143
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   144
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   145
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   146
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   147
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   148
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   149
Check that debugobshistory on the second diverged revision show the revision
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   150
and the diverent one
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   151
  $ hg obslog fdf9bde5129a --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
   152
  o  fdf9bde5129a (2) A1
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   153
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   154
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   155
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   156
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   157
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   158
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   159
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   160
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   161
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   162
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   163
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   164
Check that all option show all of them
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   165
  $ hg obslog fdf9bde5129a -a --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
   166
  o  fdf9bde5129a (2) A1
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   167
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   168
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   169
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   170
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   171
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   172
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   173
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   174
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   175
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   176
  
2484
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
   177
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   178
Check that debugobshistory on the both diverged revision show a coherent
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   179
graph
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   180
  $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --patch
3930
d00f0c369bc7 test-compat: merge mercurial-4.5 into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3924
diff changeset
   181
  o  fdf9bde5129a (2) A1
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   182
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   183
  @  471f378eab4c (1) A0
3559
d166b3dc5e8a tests: do not glob out fixed dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   184
       rewritten(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3400
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   185
         diff -r 471f378eab4c -r fdf9bde5129a changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   186
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   187
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   188
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   189
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   190
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   191
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   192
  
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   193
  $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --no-graph -Tjson | python -m json.tool
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   194
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   195
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   196
          "markers": [],
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   197
          "node": "fdf9bde5129a",
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   198
          "rev": 2,
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   199
          "shortdescription": "A1"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   200
      },
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   201
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   202
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   203
              {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   204
                  "date": [
3924
f3713d41b85b test-compat: merge mercurial-4.6 into mercurial-4.5
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3909
diff changeset
   205
                      0.0,
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   206
                      0
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   207
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   208
                  "effect": [
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   209
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   210
                  ],
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3432
diff changeset
   211
                  "operation": "amend",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   212
                  "succnodes": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   213
                      "fdf9bde5129a"
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   214
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   215
                  "user": "test",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   216
                  "verb": "rewritten"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   217
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   218
          ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   219
          "node": "471f378eab4c",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   220
          "rev": 1,
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   221
          "shortdescription": "A0"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   222
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   223
  ]
2290
a36a8c6a09ac ui: change the hidden revision error message
Boris Feld <boris.feld@octobus.net>
parents: 2289
diff changeset
   224
  $ hg update 471f378eab4c
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   225
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   226
  $ hg update --hidden 'desc(A0)'
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
   227
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved