tests/test-directaccess.t
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 27 Dec 2017 00:24:53 +0530
changeset 35519 31fe397f2bda
parent 35518 02fdb8c018aa
child 35534 b6ce3568771d
permissions -rw-r--r--
revert: support reverting to hidden cset if directaccess config is set This patch adds support for reverting files to a hidden changeset if `experimental.directacess=True` is set. Differential Revision: https://phab.mercurial-scm.org/D1763
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
35518
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   146
`hg update`
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   147
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   148
  $ hg up 28ad74
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   149
  updating to a hidden changeset 28ad74487de9
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   150
  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: 35497
diff changeset
   151
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   152
  $ hg up 3
02fdb8c018aa update: support updating to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35497
diff changeset
   153
  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: 35497
diff changeset
   154
35519
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   155
`hg revert`
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   156
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   157
  $ hg revert -r 28ad74 --all
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   158
  reverting c
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   159
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   160
  $ hg diff
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   161
  diff -r 2443a0e66469 c
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   162
  --- 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: 35518
diff changeset
   163
  +++ 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: 35518
diff changeset
   164
  @@ -1,2 +1,1 @@
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   165
   foo
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   166
  -bar
31fe397f2bda revert: support reverting to hidden cset if directaccess config is set
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35518
diff changeset
   167
35497
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   168
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
   169
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   170
  $ 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
   171
  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
   172
  (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
   173
  [255]
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   174
b378a3d840ab commands: use the new API to access hidden changesets in various commands
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   175
  $ 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
   176
  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
   177
  (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
   178
  [255]