tests/test-evolve-obshistory-phase-divergent.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 03 Aug 2018 00:22:50 +0200
branchmercurial-4.3
changeset 3936 537fd9a86c06
parent 3930 d00f0c369bc7
permissions -rw-r--r--
test-compat: merge mercurial-4.4 into mercurial-4.3
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    31
  |    obsolete:    reworded as 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 .
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    44
  1 new bumped 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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    51
  |  trouble:     bumped
3893
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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    70
       rewritten(description) as fdf9bde5129a 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
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
    85
       rewritten(description) as fdf9bde5129a 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
                  ],
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   106
                  "succnodes": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   107
                      "fdf9bde5129a"
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   108
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   109
                  "user": "test",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   110
                  "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
   111
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   112
          ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   113
          "node": "471f378eab4c",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   114
          "rev": 1,
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   115
          "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
   116
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   117
  ]
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   118
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
   119
and the diverent one
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   120
  $ 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
   121
  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
   122
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   123
  @  471f378eab4c (1) A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   124
       rewritten(description) as fdf9bde5129a 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
   125
         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
   126
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   127
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   128
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   129
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   130
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   131
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   132
  
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
   133
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
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
   135
  $ 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
   136
  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
   137
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   138
  @  471f378eab4c (1) A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   139
       rewritten(description) as fdf9bde5129a 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
   140
         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
   141
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   142
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   143
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   144
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   145
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   146
  
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
   147
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   148
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
   149
and the diverent one
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   150
  $ 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
   151
  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
   152
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   153
  @  471f378eab4c (1) A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   154
       rewritten(description) as fdf9bde5129a 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
   155
         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
   156
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   157
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   158
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   159
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   160
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   161
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   162
  
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
   163
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
   164
  $ 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
   165
  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
   166
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   167
  @  471f378eab4c (1) A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   168
       rewritten(description) as fdf9bde5129a 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
   169
         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
   170
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   171
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   172
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   173
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   174
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   175
  
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
   176
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   177
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
   178
graph
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   179
  $ 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
   180
  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
   181
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   182
  @  471f378eab4c (1) A0
3936
537fd9a86c06 test-compat: merge mercurial-4.4 into mercurial-4.3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3930
diff changeset
   183
       rewritten(description) as fdf9bde5129a 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
   184
         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
   185
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   186
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   187
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   188
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   189
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   190
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   191
  
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   192
  $ 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
   193
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   194
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   195
          "markers": [],
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   196
          "node": "fdf9bde5129a",
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   197
          "rev": 2,
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   198
          "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
   199
      },
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   200
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   201
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   202
              {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   203
                  "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
   204
                      0.0,
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   205
                      0
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   206
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   207
                  "effect": [
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   208
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   209
                  ],
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   210
                  "succnodes": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   211
                      "fdf9bde5129a"
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   212
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   213
                  "user": "test",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   214
                  "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
   215
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   216
          ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   217
          "node": "471f378eab4c",
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   218
          "rev": 1,
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   219
          "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
   220
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   221
  ]
2290
a36a8c6a09ac ui: change the hidden revision error message
Boris Feld <boris.feld@octobus.net>
parents: 2289
diff changeset
   222
  $ hg update 471f378eab4c
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   223
  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
   224
  $ hg update --hidden 'desc(A0)'
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
   225
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved