tests/test-evolve-obshistory-phase-divergent.t
author Anton Shestakov <av6@dwimlabs.net>
Fri, 08 May 2020 22:50:09 +0800
branchmercurial-4.6
changeset 5368 844b1ad5b34b
parent 5163 1752a2e7a226
parent 5349 e8660b28bfee
permissions -rw-r--r--
test-compat: merge mercurial-4.7 into mercurial-4.6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
     1
Testing obslog and other commands accessing obsolete revisions.
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     2
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     3
Global setup
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     4
============
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     5
3885
3df8b6ecce2a tests: extract obshistory setup in a separate file
Boris Feld <boris.feld@octobus.net>
parents: 3884
diff changeset
     6
  $ . $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
     7
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
     8
Test output with phase-divergence
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
     9
=================================
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    10
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    11
Test setup
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    12
----------
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    13
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    14
  $ hg init $TESTTMP/phase-divergence
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    15
  $ 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
    16
  $ mkcommit ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    17
  $ mkcommit A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    18
  $ hg amend -m "A1"
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    19
  $ hg log --hidden -G
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    20
  @  changeset:   2:fdf9bde5129a
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    21
  |  tag:         tip
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    22
  |  parent:      0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    23
  |  user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    24
  |  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
    25
  |  summary:     A1
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    26
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    27
  | x  changeset:   1:471f378eab4c
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    28
  |/   user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    29
  |    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
    30
  |    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
    31
  |    summary:     A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    32
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    33
  o  changeset:   0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    34
     user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    35
     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
    36
     summary:     ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    37
  
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    38
  $ hg update --hidden 'desc(A0)'
3909
f7afd3a158e3 test-compat: backout change to 1e103c7f7663
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3893
diff changeset
    39
  updating to a hidden changeset 471f378eab4c
f7afd3a158e3 test-compat: backout change to 1e103c7f7663
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3893
diff changeset
    40
  (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a)
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
    41
  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
    42
  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
    43
  (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
    44
  $ hg phase -p .
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    45
  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
    46
  $ hg log --hidden -G
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    47
  *  changeset:   2:fdf9bde5129a
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    48
  |  tag:         tip
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    49
  |  parent:      0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    50
  |  user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    51
  |  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
    52
  |  instability: phase-divergent
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    53
  |  summary:     A1
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    54
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    55
  | @  changeset:   1:471f378eab4c
2289
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    56
  |/   user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    57
  |    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
    58
  |    summary:     A0
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    59
  |
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    60
  o  changeset:   0:ea207398892e
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    61
     user:        test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    62
     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
    63
     summary:     ROOT
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    64
  
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    65
Actual test
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    66
-----------
61d073590fb7 ui: add better messages when the working copy become obsolete.
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    67
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
    68
Check that obslog on the public revision shows both public (diverged) and draft (divergent) revisions
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    69
  $ hg obslog --hidden 471f378eab4c --patch --no-origin
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    70
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
    71
       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
    72
         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
    73
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    74
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    75
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    76
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    77
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    78
  
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    79
  
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
    80
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
Check that with all option, every changeset is shown
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    82
  $ hg obslog --hidden --all 471f378eab4c --patch --no-origin
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    83
  *  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
    84
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
    85
  @  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
    86
       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
    87
         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
    88
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
    89
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    90
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    91
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    92
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
    93
  
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
    94
  
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    95
  $ hg obslog --hidden --all 471f378eab4c --patch
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    96
  *  fdf9bde5129a (2) A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    97
  |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    98
  |      diff -r 471f378eab4c -r fdf9bde5129a changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
    99
  |      --- a/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   100
  |      +++ b/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   101
  |      @@ -1,1 +1,1 @@
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   102
  |      -A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   103
  |      +A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   104
  |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   105
  |
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   106
  @  471f378eab4c (1) A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   107
  
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   108
  $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -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
   109
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   110
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   111
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   112
              {
5171
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   113
                  "dates": [
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   114
                      [
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   115
                          *, (glob)
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   116
                          0
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   117
                      ]
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   118
                  ],
4939
7aba58dc4b73 obslog: use plural name "effects" for list of all effects
Martin von Zweigbergk <martinvonz@google.com>
parents: 4918
diff changeset
   119
                  "effects": [
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   120
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   121
                  ],
5169
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   122
                  "operations": [
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   123
                      "amend"
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   124
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   125
                  "succnodes": [
4951
7bfd3fed5d1f obslog: make {succnodes} be full hex nodes
Martin von Zweigbergk <martinvonz@google.com>
parents: 4950
diff changeset
   126
                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   127
                  ],
5168
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   128
                  "users": [
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   129
                      "test"
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   130
                  ],
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   131
                  "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
   132
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   133
          ],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   134
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   135
          "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
   136
      }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   137
  ]
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   138
  $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   139
  [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   140
      {
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   141
          "markers": [],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   142
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   143
          "shortdescription": "A0"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   144
      }
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   145
  ]
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
   146
Check that obslog on the draft (divergent) revision also shows public (diverged) revision
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   147
  $ hg obslog fdf9bde5129a --patch
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3411
diff changeset
   148
  *  fdf9bde5129a (2) A1
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   149
  |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   150
  |      diff -r 471f378eab4c -r fdf9bde5129a changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   151
  |      --- a/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   152
  |      +++ b/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   153
  |      @@ -1,1 +1,1 @@
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   154
  |      -A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   155
  |      +A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   156
  |
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   157
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   158
  @  471f378eab4c (1) A0
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   159
  
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
   160
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
   161
Check that all option shows all of them
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   162
  $ hg obslog fdf9bde5129a -a --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   163
  *  fdf9bde5129a (2) A1
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   164
  |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   165
  |      diff -r 471f378eab4c -r fdf9bde5129a changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   166
  |      --- a/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   167
  |      +++ b/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   168
  |      @@ -1,1 +1,1 @@
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   169
  |      -A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   170
  |      +A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   171
  |
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
   172
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   173
  @  471f378eab4c (1) A0
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
   174
  
5339
258c0a99c5b0 tests: update section headers and comments in obslog-related tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5337
diff changeset
   175
Check that obslog on the both draft (divergent) and public (diverged) revisions shows a coherent graph
5340
9351e6c22e74 tests: replace an X+X revset with something meaningful
Anton Shestakov <av6@dwimlabs.net>
parents: 5339
diff changeset
   176
  $ hg obslog 'fdf9bde5129a+471f378eab4c' --patch
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   177
  *  fdf9bde5129a (2) A1
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   178
  |    reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000)
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   179
  |      diff -r 471f378eab4c -r fdf9bde5129a changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   180
  |      --- a/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   181
  |      +++ b/changeset-description
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   182
  |      @@ -1,1 +1,1 @@
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   183
  |      -A0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   184
  |      +A1
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   185
  |
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   186
  |
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   187
  @  471f378eab4c (1) A0
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   188
  
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   189
  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph --no-origin -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
   190
  [
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   191
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   192
          "markers": [],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   193
          "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   194
          "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
   195
      },
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   196
      {
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   197
          "markers": [
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   198
              {
5171
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   199
                  "dates": [
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   200
                      [
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   201
                          0.0,
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   202
                          0
7f7f40cc6c9b obslog: make date template property into dates
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   203
                      ]
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   204
                  ],
4939
7aba58dc4b73 obslog: use plural name "effects" for list of all effects
Martin von Zweigbergk <martinvonz@google.com>
parents: 4918
diff changeset
   205
                  "effects": [
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   206
                      "description"
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   207
                  ],
5169
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   208
                  "operations": [
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   209
                      "amend"
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5168
diff changeset
   210
                  ],
2957
586c9ace20b3 obslog: simplify formatter keys
Alain Leufroy
parents: 2956
diff changeset
   211
                  "succnodes": [
4951
7bfd3fed5d1f obslog: make {succnodes} be full hex nodes
Martin von Zweigbergk <martinvonz@google.com>
parents: 4950
diff changeset
   212
                      "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"
2342
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   213
                  ],
5168
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   214
                  "users": [
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   215
                      "test"
c7ca43bba6c5 obslog: make user template property into users
Anton Shestakov <av6@dwimlabs.net>
parents: 5125
diff changeset
   216
                  ],
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   217
                  "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
   218
              }
e28026b4d3c1 obshistory: use formatter instead of ui.write in the debugobshistory command
Boris Feld <boris.feld@octobus.net>
parents: 2336
diff changeset
   219
          ],
4983
6d40e0166522 obslog: make {node} the full node and leave shortening to template
Martin von Zweigbergk <martinvonz@google.com>
parents: 4951
diff changeset
   220
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
2957
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
  ]
5349
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   224
  $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph -Tjson | python -m json.tool
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   225
  [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   226
      {
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   227
          "markers": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   228
              {
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   229
                  "dates": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   230
                      [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   231
                          0.0,
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   232
                          0
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   233
                      ]
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   234
                  ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   235
                  "effects": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   236
                      "description"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   237
                  ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   238
                  "operations": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   239
                      "amend"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   240
                  ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   241
                  "prednodes": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   242
                      "471f378eab4c5e25f6c77f785b27c936efb22874"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   243
                  ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   244
                  "users": [
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   245
                      "test"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   246
                  ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   247
                  "verb": "reworded"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   248
              }
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   249
          ],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   250
          "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e",
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   251
          "shortdescription": "A1"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   252
      },
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   253
      {
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   254
          "markers": [],
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   255
          "node": "471f378eab4c5e25f6c77f785b27c936efb22874",
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   256
          "shortdescription": "A0"
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   257
      }
e8660b28bfee obslog: makes --origin flag the default
Anton Shestakov <av6@dwimlabs.net>
parents: 5340
diff changeset
   258
  ]
2290
a36a8c6a09ac ui: change the hidden revision error message
Boris Feld <boris.feld@octobus.net>
parents: 2289
diff changeset
   259
  $ hg update 471f378eab4c
3893
aab2afc2bd82 tests: add a content-divergent obshistory test
Boris Feld <boris.feld@octobus.net>
parents: 3891
diff changeset
   260
  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
   261
  $ hg update --hidden 'desc(A0)'
3747
1e103c7f7663 test: update to new outputs
Boris Feld <boris.feld@octobus.net>
parents: 3730
diff changeset
   262
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved