tests/test-evolve-obshistory-phase-divergent.t
author Anton Shestakov <av6@dwimlabs.net>
Tue, 18 Feb 2020 17:58:22 +0800
changeset 5168 c7ca43bba6c5
parent 5125 ce8479d1a6f9
child 5169 897b371cd0c5
permissions -rw-r--r--
obslog: make user template property into users
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
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
    41
  updated to hidden changeset 471f378eab4c
3432
f57be161f34b test: update with new 'update' hint about obsfate
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3417
diff changeset
    42
  (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a)
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    43
  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
    44
  (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
    45
  $ hg phase -p .
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    46
  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
    47
  $ hg log --hidden -G
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    48
  *  changeset:   2:fdf9bde5129a
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    49
  |  tag:         tip
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    50
  |  parent:      0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    51
  |  user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    52
  |  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
    53
  |  instability: phase-divergent
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    54
  |  summary:     A1
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    55
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    56
  | @  changeset:   1:471f378eab4c
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    57
  |/   user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    58
  |    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
    59
  |    summary:     A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    60
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    61
  o  changeset:   0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    62
     user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    63
     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
    64
     summary:     ROOT
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
Actual test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    67
-----------
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    68
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    69
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
    70
  $ hg obslog --hidden 471f378eab4c --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    71
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
    72
       reworded(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
    73
         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
    74
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    75
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    76
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    77
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    78
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    79
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    80
  
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
    81
262d684851dc obshistory: add the all option to obslog to show the while obs tree
Boris Feld <boris.feld@octobus.net>
parents: 2483
diff changeset
    82
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
    83
  $ hg obslog --hidden --all 471f378eab4c --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    84
  *  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
    85
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    86
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
    87
       reworded(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
    88
         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
    89
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    90
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    91
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    92
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    93
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    94
  
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
    95
  
2477
d7f7e8f3b51c test: rename all olog references
Boris Feld <boris.feld@octobus.net>
parents: 2476
diff changeset
    96
  $ 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
    97
  [
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
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   100
              {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   101
                  "date": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   102
                      *, (glob)
5125
ce8479d1a6f9 tests: drop useless "(glob)" for timezone offsets
Anton Shestakov <av6@dwimlabs.net>
parents: 5123
diff changeset
   103
                      0
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   104
                  ],
4939
7aba58dc4b73 obslog: use plural name "effects" for list of all effects
Martin von Zweigbergk <martinvonz@google.com>
parents: 4918
diff changeset
   105
                  "effects": [
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   106
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   107
                  ],
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3432
diff changeset
   108
                  "operation": "amend",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   109
                  "succnodes": [
4951
7bfd3fed5d1f obslog: make {succnodes} be full hex nodes
Martin von Zweigbergk <martinvonz@google.com>
parents: 4950
diff changeset
   110
                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   111
                  ],
5168
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   112
                  "users": [
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   113
                      "test"
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   114
                  ],
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   115
                  "verb": "reworded"
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
          ],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   118
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   119
          "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
   120
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   121
  ]
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   122
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
   123
and the diverent one
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   124
  $ hg obslog fdf9bde5129a --patch
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3411
diff changeset
   125
  *  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
   126
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   127
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   128
       reworded(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
   129
         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
   130
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   131
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   132
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   133
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   134
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   135
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   136
  
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
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
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
   139
  $ hg obslog fdf9bde5129a -a --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   140
  *  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
   141
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   142
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   143
       reworded(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
   144
         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
   145
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   146
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   147
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   148
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   149
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   150
  
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
   151
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   152
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
   153
and the diverent one
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   154
  $ hg obslog fdf9bde5129a --patch
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   155
  *  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
   156
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   157
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   158
       reworded(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
   159
         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
   160
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   161
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   162
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   163
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   164
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   165
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   166
  
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
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
   168
  $ hg obslog fdf9bde5129a -a --patch
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   169
  *  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
   170
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   171
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   172
       reworded(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
   173
         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
   174
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   175
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   176
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   177
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   178
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   179
  
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
   180
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   181
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
   182
graph
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   183
  $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --patch
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   184
  *  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
   185
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   186
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   187
       reworded(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
   188
         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
   189
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   190
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   191
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   192
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   193
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   194
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   195
  
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   196
  $ 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
   197
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   198
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   199
          "markers": [],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   200
          "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   201
          "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
   202
      },
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
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   205
              {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   206
                  "date": [
4950
60d2065b720b obslog: remove now-unused code for plain styling
Martin von Zweigbergk <martinvonz@google.com>
parents: 4939
diff changeset
   207
                      0.0,
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   208
                      0
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   209
                  ],
4939
7aba58dc4b73 obslog: use plural name "effects" for list of all effects
Martin von Zweigbergk <martinvonz@google.com>
parents: 4918
diff changeset
   210
                  "effects": [
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   211
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   212
                  ],
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3432
diff changeset
   213
                  "operation": "amend",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   214
                  "succnodes": [
4951
7bfd3fed5d1f obslog: make {succnodes} be full hex nodes
Martin von Zweigbergk <martinvonz@google.com>
parents: 4950
diff changeset
   215
                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   216
                  ],
5168
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   217
                  "users": [
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   218
                      "test"
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   219
                  ],
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   220
                  "verb": "reworded"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   221
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   222
          ],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   223
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   224
          "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
   225
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   226
  ]
2290
a36a8c6a09ac ui: change the hidden revision error message
Boris Feld <boris.feld@octobus.net>
parents: 2289
diff changeset
   227
  $ hg update 471f378eab4c
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   228
  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
   229
  $ hg update --hidden 'desc(A0)'
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
   230
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved