tests/test-directaccess.t
author Boris Feld <boris.feld@octobus.net>
Fri, 05 Jan 2018 09:12:08 +0100
changeset 35571 265cd9e19d26
parent 35539 ffd7b7cd309b
child 35611 7336ac5e786e
permissions -rw-r--r--
visibility: improve the message when accessing filtered obsolete rev When trying to access filtered revision, it is likely because they have been obsoleted by an obs-marker. The current message shows how to access the revision anyway: abort: hidden revision '13bedc178fce'! But in the case of an obsoleted revision, the user is likely to want to update to or use the successor of the revision. We update the message to display more information about the obsolescence fate of the revision in the following cases: abort: hidden revision '13bedc178fce' is pruned! abort: hidden revision '13bedc178fce' has diverged! abort: hidden revision '13bedc178fce' was rewritten as X, Y and 2 more! Differential Revision: https://phab.mercurial-scm.org/D1591
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Tests for access level on hidden commits by various commands on based of their
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
type.
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
Setting the required config to start this
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  $ cat >> $HGRCPATH <<EOF
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > [experimental]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > evolution=createmarkers, allowunstable
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > directaccess=True
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > directaccess.revnums=True
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  > [extensions]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
  > amend =
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  > EOF
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ hg init repo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  $ cd repo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ for ch in a b c; do touch $ch; echo "foo" >> $ch; hg ci -Aqm "Added "$ch; done
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ hg log -G -T '{rev}:{node} {desc}' --hidden
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  @  2:28ad74487de9599d00d81085be739c61fc340652 Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  |
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  o  1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  |
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  o  0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  $ echo "bar" >> c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
  $ hg amend
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
  $ hg log -G -T '{rev}:{node} {desc}' --hidden
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  @  3:2443a0e664694756d8b435d06b6ad84f941b6fc0 Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  |
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  | x  2:28ad74487de9599d00d81085be739c61fc340652 Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  |/
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  o  1:29becc82797a4bc11ec8880b58eaecd2ab3e7760 Added b
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  |
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  o  0:18d04c59bb5d2d4090ad9a5b59bd6274adb63add Added a
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
Testing read only commands on the hidden revision
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
Testing with rev number
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  $ hg exp 2 --config experimental.directaccess.revnums=False
35571
265cd9e19d26 visibility: improve the message when accessing filtered obsolete rev
Boris Feld <boris.feld@octobus.net>
parents: 35539
diff changeset
    43
  abort: hidden revision '2' was rewritten as: 2443a0e66469!
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  (use --hidden to access hidden revisions)
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  [255]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  $ hg exp 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
  # HG changeset patch
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  # User test
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  # Date 0 0
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  #      Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  # Node ID 28ad74487de9599d00d81085be739c61fc340652
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  # Parent  29becc82797a4bc11ec8880b58eaecd2ab3e7760
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  diff -r 29becc82797a -r 28ad74487de9 c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  @@ -0,0 +1,1 @@
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  +foo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  $ hg log -r 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  changeset:   2:28ad74487de9
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  user:        test
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  date:        Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
  obsolete:    rewritten using amend as 3:2443a0e66469
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
  summary:     Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  $ hg identify -r 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  28ad74487de9
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  $ hg status --change 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  A c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  $ hg status --change 2 --config experimental.directaccess.revnums=False
35571
265cd9e19d26 visibility: improve the message when accessing filtered obsolete rev
Boris Feld <boris.feld@octobus.net>
parents: 35539
diff changeset
    76
  abort: hidden revision '2' was rewritten as: 2443a0e66469!
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  (use --hidden to access hidden revisions)
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  [255]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  $ hg diff -c 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
  diff -r 29becc82797a -r 28ad74487de9 c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  @@ -0,0 +1,1 @@
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  +foo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
Testing with hash
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
`hg export`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  $ hg exp 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  # HG changeset patch
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
  # User test
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  # Date 0 0
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  #      Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  # Node ID 28ad74487de9599d00d81085be739c61fc340652
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
  # Parent  29becc82797a4bc11ec8880b58eaecd2ab3e7760
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  diff -r 29becc82797a -r 28ad74487de9 c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  @@ -0,0 +1,1 @@
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  +foo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
`hg log`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  $ hg log -r 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  changeset:   2:28ad74487de9
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  user:        test
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  date:        Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  obsolete:    rewritten using amend as 3:2443a0e66469
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  summary:     Added c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
  
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
`hg cat`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
  $ hg cat -r 28ad74 c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   118
  foo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
`hg diff`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   121
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  $ hg diff -c 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
  diff -r 29becc82797a -r 28ad74487de9 c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   124
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   125
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   126
  @@ -0,0 +1,1 @@
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   127
  +foo
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   128
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   129
`hg files`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   130
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   131
  $ hg files -r 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   132
  a
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   133
  b
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   134
  c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   135
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   136
`hg identify`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   137
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   138
  $ hg identify -r 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   139
  28ad74487de9
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   140
35538
b6ce3568771d annotate: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35523
diff changeset
   141
`hg annotate`
b6ce3568771d annotate: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35523
diff changeset
   142
b6ce3568771d annotate: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35523
diff changeset
   143
  $ hg annotate -r 28ad74 a
b6ce3568771d annotate: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35523
diff changeset
   144
  0: foo
b6ce3568771d annotate: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35523
diff changeset
   145
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   146
`hg status`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   147
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
  $ hg status --change 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
  A c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
35539
ffd7b7cd309b archive: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35538
diff changeset
   151
`hg archive`
ffd7b7cd309b archive: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35538
diff changeset
   152
ffd7b7cd309b archive: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35538
diff changeset
   153
This should not throw error
ffd7b7cd309b archive: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35538
diff changeset
   154
  $ hg archive -r 28ad74 foo
ffd7b7cd309b archive: add support to specify hidden revs if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35538
diff changeset
   155
35522
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   156
`hg update`
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   157
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   158
  $ hg up 28ad74
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   159
  updating to a hidden changeset 28ad74487de9
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   160
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   161
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   162
  $ hg up 3
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   163
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35501
diff changeset
   164
35523
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   165
`hg revert`
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   166
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   167
  $ hg revert -r 28ad74 --all
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   168
  reverting c
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   169
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   170
  $ hg diff
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   171
  diff -r 2443a0e66469 c
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   172
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   173
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   174
  @@ -1,2 +1,1 @@
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   175
   foo
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   176
  -bar
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35522
diff changeset
   177
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   178
Commands with undefined cmdtype should not work right now
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   179
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   180
  $ hg phase -r 28ad74
35571
265cd9e19d26 visibility: improve the message when accessing filtered obsolete rev
Boris Feld <boris.feld@octobus.net>
parents: 35539
diff changeset
   181
  abort: hidden revision '28ad74' was rewritten as: 2443a0e66469!
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   182
  (use --hidden to access hidden revisions)
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   183
  [255]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   184
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   185
  $ hg phase -r 2
35571
265cd9e19d26 visibility: improve the message when accessing filtered obsolete rev
Boris Feld <boris.feld@octobus.net>
parents: 35539
diff changeset
   186
  abort: hidden revision '2' was rewritten as: 2443a0e66469!
35501
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   187
  (use --hidden to access hidden revisions)
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   188
  [255]