tests/test-evolve-obshistory.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 03 Apr 2020 19:10:29 +0200
changeset 5262 678a9223aad3
parent 5174 9b8d4403b735
parent 5215 3d7cd43d591a
child 5339 258c0a99c5b0
permissions -rw-r--r--
branching: merge stable in default
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
3729
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
     9
Test simple common cases
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    10
========================
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    11
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    12
Test setup
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    13
----------
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    14
  $ hg init $TESTTMP/simple
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    15
  $ cd $TESTTMP/simple
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    16
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    17
Actual test
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    18
-----------
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    19
  $ hg obslog -ap null
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    20
  @  000000000000 (-1)
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    21
  
3730
f5b9030e18e9 tests: test that `hg obslog wdir()` aborts with a useful message
Anton Shestakov <av6@dwimlabs.net>
parents: 3729
diff changeset
    22
  $ hg obslog 'wdir()'
f5b9030e18e9 tests: test that `hg obslog wdir()` aborts with a useful message
Anton Shestakov <av6@dwimlabs.net>
parents: 3729
diff changeset
    23
  abort: working directory revision cannot be specified
f5b9030e18e9 tests: test that `hg obslog wdir()` aborts with a useful message
Anton Shestakov <av6@dwimlabs.net>
parents: 3729
diff changeset
    24
  [255]
3729
1b1badb3d2fc obshistory: make obslog work when a commit doesn't have any description
Anton Shestakov <av6@dwimlabs.net>
parents: 3663
diff changeset
    25
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    26
Test output with pushed and pulled obs markers
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    27
==============================================
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    28
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    29
Test setup
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    30
----------
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    31
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    32
  $ hg init $TESTTMP/local-remote-markers-1
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    33
  $ cd $TESTTMP/local-remote-markers-1
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    34
  $ mkcommit ROOT
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    35
  $ mkcommit A0
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    36
  $ hg log --hidden -G
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    37
  @  changeset:   1:471f378eab4c
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    38
  |  tag:         tip
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    39
  |  user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    40
  |  date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    41
  |  summary:     A0
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    42
  |
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    43
  o  changeset:   0:ea207398892e
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    44
     user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    45
     date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    46
     summary:     ROOT
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    47
  
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    48
  $ hg clone $TESTTMP/local-remote-markers-1 $TESTTMP/local-remote-markers-2
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    49
  updating to branch default
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    50
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    51
  $ cd $TESTTMP/local-remote-markers-2
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    52
  $ hg log --hidden -G
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    53
  @  changeset:   1:471f378eab4c
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    54
  |  tag:         tip
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    55
  |  user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    56
  |  date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    57
  |  summary:     A0
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    58
  |
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    59
  o  changeset:   0:ea207398892e
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    60
     user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    61
     date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    62
     summary:     ROOT
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    63
  
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    64
  $ cd $TESTTMP/local-remote-markers-1
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    65
  $ hg amend -m "A1"
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    66
  $ hg amend -m "A2"
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    67
  $ hg log --hidden -G
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    68
  @  changeset:   3:7a230b46bf61
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    69
  |  tag:         tip
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    70
  |  parent:      0:ea207398892e
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    71
  |  user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    72
  |  date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    73
  |  summary:     A2
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    74
  |
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    75
  | x  changeset:   2:fdf9bde5129a
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    76
  |/   parent:      0:ea207398892e
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    77
  |    user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    78
  |    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
    79
  |    obsolete:    reworded using amend as 3:7a230b46bf61
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    80
  |    summary:     A1
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    81
  |
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    82
  | x  changeset:   1:471f378eab4c
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    83
  |/   user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    84
  |    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
    85
  |    obsolete:    reworded using amend as 2:fdf9bde5129a
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    86
  |    summary:     A0
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    87
  |
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    88
  o  changeset:   0:ea207398892e
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    89
     user:        test
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    90
     date:        Thu Jan 01 00:00:00 1970 +0000
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    91
     summary:     ROOT
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    92
  
5215
3d7cd43d591a tests: unindent lines that only have one leading space
Anton Shestakov <av6@dwimlabs.net>
parents: 5123
diff changeset
    93
Actual test
3d7cd43d591a tests: unindent lines that only have one leading space
Anton Shestakov <av6@dwimlabs.net>
parents: 5123
diff changeset
    94
-----------
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
    95
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
    96
  $ hg obslog 7a230b46bf61 --patch
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    97
  @  7a230b46bf61 (3) A2
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    98
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
    99
  x  fdf9bde5129a (2) A1
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   100
  |    reworded(description) as 7a230b46bf61 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
   101
  |      diff -r fdf9bde5129a -r 7a230b46bf61 changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   102
  |      --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   103
  |      +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   104
  |      @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   105
  |      -A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   106
  |      +A2
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   107
  |
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   108
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   109
  x  471f378eab4c (1) A0
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   110
       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
   111
         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
   112
         --- a/changeset-description
6d345d7ca682 obslog: add header to the changeset description diff
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3399
diff changeset
   113
         +++ b/changeset-description
2639
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   114
         @@ -1,1 +1,1 @@
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   115
         -A0
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
diff changeset
   116
         +A1
a5d8062f55ba obslog: also display description patch with --patch
Boris Feld <boris.feld@octobus.net>
parents: 2637
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
  
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   119
  $ cd $TESTTMP/local-remote-markers-2
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   120
  $ hg pull
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   121
  pulling from $TESTTMP/local-remote-markers-1
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   122
  searching for changes
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   123
  adding changesets
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   124
  adding manifests
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   125
  adding file changes
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   126
  added 1 changesets with 0 changes to 1 files (+1 heads)
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   127
  2 new obsolescence markers
2710
e22de367fc74 compat: adapt to change in 53b3a1968aa6-core
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2709
diff changeset
   128
  obsoleted 1 changesets
4181
ab3581bc0637 branching: preserve the expected output on default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4165
diff changeset
   129
  new changesets 7a230b46bf61 (1 drafts)
2349
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   130
  (run 'hg heads' to see heads, 'hg merge' to merge)
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   131
  working directory parent is obsolete! (471f378eab4c)
521a18a10a06 obshistory: display a message when one marker node has no change ctx
Boris Feld <boris.feld@octobus.net>
parents: 2342
diff changeset
   132
  (use 'hg evolve' to update to its successor: 7a230b46bf61)
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   133
Check that debugobshistory works with markers pointing to missing local
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   134
changectx
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   135
  $ hg obslog 7a230b46bf61 --patch
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   136
  o  7a230b46bf61 (2) A2
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   137
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   138
  x  fdf9bde5129a
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   139
  |    reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3055
774b4ea6ca58 obslog: remove the word "yet" from "No patch available yet"
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3054
diff changeset
   140
  |      (No patch available, context is not local)
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   141
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
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)
3055
774b4ea6ca58 obslog: remove the word "yet" from "No patch available yet"
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3054
diff changeset
   144
         (No patch available, successor is unknown locally)
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   145
  
3884
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   146
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   147
  $ hg obslog 7a230b46bf61 --patch -f
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   148
  o  7a230b46bf61 (2) A2
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   149
  |
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   150
  @  471f378eab4c (1) A0
5173
dbbb48d93f18 obslog: remove the separate "obslog -f" implementation and use the common one
Anton Shestakov <av6@dwimlabs.net>
parents: 5169
diff changeset
   151
       reworded(description) as 7a230b46bf61 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3884
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   152
         diff -r 471f378eab4c -r 7a230b46bf61 changeset-description
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   153
         --- a/changeset-description
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   154
         +++ b/changeset-description
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   155
         @@ -1,1 +1,1 @@
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   156
         -A0
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   157
         +A2
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   158
  
16bec7609a08 obslog: add a new flag to filter out non-local nodes
Boris Feld <boris.feld@octobus.net>
parents: 3747
diff changeset
   159
  
2637
49f2741c4dd7 obslog: add a patch option
Boris Feld <boris.feld@octobus.net>
parents: 2585
diff changeset
   160
  $ hg obslog 7a230b46bf61 --color=debug --patch
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   161
  o  [evolve.node|7a230b46bf61] [evolve.rev|(2)] [evolve.short_description|A2]
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   162
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   163
  x  [evolve.node evolve.missing_change_ctx|fdf9bde5129a]
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   164
  |    [evolve.verb|reworded](description) as [evolve.node|7a230b46bf61] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
3055
774b4ea6ca58 obslog: remove the word "yet" from "No patch available yet"
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3054
diff changeset
   165
  |      (No patch available, context is not local)
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   166
  |
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   167
  @  [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
5123
900668a93629 obslog: use _successorsetverb() in regular obslog too
Anton Shestakov <av6@dwimlabs.net>
parents: 4983
diff changeset
   168
       [evolve.verb|reworded](description) as [evolve.node|fdf9bde5129a] using [evolve.operation|amend] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
3055
774b4ea6ca58 obslog: remove the word "yet" from "No patch available yet"
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3054
diff changeset
   169
         (No patch available, successor is unknown locally)
2407
783a74c60a5e obshistory: add a graph option on the debugobshistory command
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2404
diff changeset
   170
  
4917
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   171
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   172
  $ hg obslog 7a230b46bf61 --graph \
5169
897b371cd0c5 obslog: make operation template property into operations
Anton Shestakov <av6@dwimlabs.net>
parents: 5123
diff changeset
   173
  > -T '{node|short} {rev} {desc|firstline}\n{markers % "rewritten using {operations}"}\n'
4917
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   174
  o  7a230b46bf61 2 A2
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   175
  |
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   176
  x  fdf9bde5129a
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   177
  |  rewritten using amend
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   178
  @  471f378eab4c 1 A0
d1d8e97d32af obslog: make changeset available to templater
Martin von Zweigbergk <martinvonz@google.com>
parents: 4181
diff changeset
   179
     rewritten using amend
5174
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   180
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   181
Test output with non-local changesets and various templates
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   182
===========================================================
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   183
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   184
  $ hg init $TESTTMP/obslog-non-local-templates
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   185
  $ cd $TESTTMP/obslog-non-local-templates
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   186
  $ cat << EOF >> .hg/hgrc
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   187
  > [templates]
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   188
  > fancy = '{desc|firstline}\n{markers % "{verb} using {operations} by {users} ({join(notes, "; ")})"}'
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   189
  > fancier = '{desc|firstline}\n{markers % "{join(users, ", ")} had {verb} this commit using {join(operations, "/")} and said: {join(notes % "\"{note}\"", ", ")})"}'
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   190
  > EOF
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   191
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   192
  $ mkcommit A0
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   193
  $ hg metaedit -m 'A1' -n 'note1' -d '42 0' --config devel.default-date='1 0' -q
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   194
  $ HGUSER=alice hg amend -m 'A2' -n 'note2'
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   195
  $ HGUSER=bob hg amend -m 'A3' -n 'note3'
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   196
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   197
  $ hg debugobsolete
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   198
  6ffd04c870fe2b73e7c885e508c4f1213a75c4d4 e481355d236800802337be3e637bd820870b04d2 0 (Thu Jan 01 00:00:01 1970 +0000) {'ef1': '33', 'note': 'note1', 'operation': 'metaedit', 'user': 'test'}
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   199
  e481355d236800802337be3e637bd820870b04d2 65835bf83412a950e6a47f023690d5e6ae09718d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'note': 'note2', 'operation': 'amend', 'user': 'alice'}
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   200
  65835bf83412a950e6a47f023690d5e6ae09718d 41985e02b792daac8907f6b30b513bbf6e8e034d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '1', 'note': 'note3', 'operation': 'amend', 'user': 'bob'}
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   201
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   202
  $ hg strip 'desc(A1) + desc(A2)' --hidden --quiet --config extensions.strip=
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   203
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   204
  $ hg obslog -f
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   205
  @  41985e02b792 (1) A3
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   206
  |
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   207
  x  6ffd04c870fe (0) A0
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   208
       rewritten(description, date) as 41985e02b792 using amend, metaedit by alice, bob, test (between Thu Jan 01 00:00:00 1970 +0000 and Thu Jan 01 00:00:01 1970 +0000)
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   209
         note: note1
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   210
         note: note2
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   211
         note: note3
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   212
  
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   213
  $ hg obslog -f -T fancy
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   214
  @  A3
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   215
  |
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   216
  x  A0
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   217
     rewritten using amend, metaedit by alice, bob, test (note1; note2; note3)
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   218
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   219
  $ hg obslog -f -T fancier
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   220
  @  A3
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   221
  |
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   222
  x  A0
9b8d4403b735 tests: add more involved tests for obslog -T now that everything is a property
Anton Shestakov <av6@dwimlabs.net>
parents: 5173
diff changeset
   223
     alice, bob, test had rewritten this commit using amend/metaedit and said: "note1", "note2", "note3")