tests/test-directaccess.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 19 Dec 2017 11:20:35 +0530
changeset 35497 b378a3d840ab
child 35518 02fdb8c018aa
permissions -rw-r--r--
commands: use the new API to access hidden changesets in various commands In previous patches, we have added an internal API to unhide hidden changesets. This patch makes the following command use that api in nowarn mode i.e. there will be no warning while accessing hidden changesets. cat, diff, export, files, heads, identify, log, manifest, parents, status This patch also adds test demonstarting the behaviour. .. feature:: Accessing hidden changesets Set config option 'experimental.directaccess = True' to access hidden changesets from read only commands. Differential Revision: https://phab.mercurial-scm.org/D1735
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35497
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
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  abort: hidden revision '2'!
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
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  abort: hidden revision '2'!
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
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   141
`hg status`
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   142
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   143
  $ 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
   144
  A c
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   145
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   146
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
   147
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
  $ hg phase -r 28ad74
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
  abort: hidden revision '28ad74'!
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
  (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
   151
  [255]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   152
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   153
  $ hg phase -r 2
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   154
  abort: hidden revision '2'!
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   155
  (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
   156
  [255]