tests/test-grab.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 10 Nov 2018 23:54:46 -0500
changeset 4254 8e891b4a54e8
parent 4232 424b498aac00
child 4363 a2fdbece7ce1
child 4391 054ff759f2fd
permissions -rw-r--r--
compat: drop Mercurial 4.3 support for exthelper The last release email noted plans to drop 4.3 and 4.4 support in the next feature release. I'd like to move this code into core, and dropping this should allow the class to be copied in unmodified.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Test for the grab command
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  > [alias]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
  > glog = log -G -T "{rev}:{node|short} {desc}\n"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  > [extensions]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  > EOF
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  $ mkcommit() {
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  >    echo "$1" > "$1"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
  >    hg add "$1"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  >    hg ci -m "add $1"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  > }
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  $ hg init repo
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ cd repo
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  $ hg help grab
4048
d7034826c0a2 pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3527
diff changeset
    19
  hg pick [-r] rev
d7034826c0a2 pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3527
diff changeset
    20
  
d7034826c0a2 pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3527
diff changeset
    21
  aliases: grab
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  
4229
a8ed26f01c8d pick: `hg help` was not showing the full cmd desc of `pick`
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4053
diff changeset
    23
  move a commit on the top of working directory parent and updates to it.
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  options:
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  
4183
536c67823962 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 4053
diff changeset
    27
   -r --rev REV  revision to pick
536c67823962 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 4053
diff changeset
    28
   -c --continue continue interrupted pick
536c67823962 commands: adjust metavariables as appropriate
Anton Shestakov <av6@dwimlabs.net>
parents: 4053
diff changeset
    29
   -a --abort    abort interrupted pick
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  (some details hidden, use --verbose to show complete help)
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ mkcommit a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ mkcommit b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  $ mkcommit c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  @  2:4538525df7e2 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
  o  1:7c3bad9141dc add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
Grabbing an ancestor
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    47
  $ hg pick -r 7c3bad9141dc
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
    48
  abort: cannot pick an ancestor revision
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
3527
7b4d1bfb6b7d grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3526
diff changeset
    51
Grabbing the working directory parent
7b4d1bfb6b7d grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3526
diff changeset
    52
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    53
  $ hg pick -r .
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
    54
  abort: cannot pick an ancestor revision
3527
7b4d1bfb6b7d grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3526
diff changeset
    55
  [255]
7b4d1bfb6b7d grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3526
diff changeset
    56
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
Specifying multiple revisions to grab
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    59
  $ hg pick 1f0dee641bb7 -r 7c3bad9141dc
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  abort: specify just one revision
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
Specifying no revisions to grab
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    65
  $ hg pick
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
  abort: empty revision set
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
Continuing without interrupted grab
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    71
  $ hg pick --continue
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
    72
  abort: no interrupted pick state exists
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
Aborting without interrupted grab
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    77
  $ hg pick --abort
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
    78
  abort: no interrupted pick state exists
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
Specifying both continue and revs
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  $ hg up 1f0dee641bb7
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
    85
  $ hg pick -r 4538525df7e2 --continue
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
  abort: cannot specify both --continue and revision
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
Making new branch heads
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
  $ mkcommit x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  created new head
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
  $ mkcommit y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  @  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  | o  2:4538525df7e2 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  | |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  | o  1:7c3bad9141dc add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
Grabbing a revision
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   108
  $ hg pick 7c3bad9141dc
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   109
  picking 1:7c3bad9141dc "add b"
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  1 new orphan changesets
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  @  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   118
  | *  2:4538525df7e2 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
  | |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
  | x  1:7c3bad9141dc add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   121
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   124
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   125
When grab does not create any changes
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   126
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   127
  $ hg graft -r 4538525df7e2
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   128
  grafting 2:4538525df7e2 "add c"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   129
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   130
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   131
  @  6:c4636a81ebeb add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   132
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   133
  o  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   134
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   135
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   136
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   137
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   138
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   139
  | *  2:4538525df7e2 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   140
  | |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   141
  | x  1:7c3bad9141dc add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   142
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   143
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   144
  
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   145
  $ hg pick -r 4538525df7e2
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   146
  picking 2:4538525df7e2 "add c"
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   147
  note: picking 2:4538525df7e2 created no changes to commit
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   148
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   149
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   150
  @  6:c4636a81ebeb add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   151
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   152
  o  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   153
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   154
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   155
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   156
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   157
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   158
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   159
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   160
interrupted grab
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   161
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   162
  $ hg up d46dc301d92f
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   163
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   164
  $ echo foo > c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   165
  $ hg ci -Aqm "foo to c"
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   166
  $ hg pick -r c4636a81ebeb
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   167
  picking 6:c4636a81ebeb "add c"
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   168
  merging c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   169
  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   170
  unresolved merge conflicts (see hg help resolve)
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   171
  [1]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   172
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   173
  $ echo foobar > c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   174
  $ hg resolve --all --mark
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   175
  (no more unresolved files)
4052
73e73471d6c6 pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4049
diff changeset
   176
  continue: hg pick --continue
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   177
  $ hg pick --continue
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   178
  $ hg glog
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   179
  @  8:44e155eb95c7 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   180
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   181
  o  7:2ccc03d1d096 foo to c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   182
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   183
  | o  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   184
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   185
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   186
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   187
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   188
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   189
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   190
  
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   191
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   192
When interrupted grab results in no changes to commit
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   193
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   194
  $ hg up d46dc301d92f
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   195
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   196
  $ echo bar > c
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   197
  $ hg add c
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   198
  $ hg ci -m "foo to c"
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   199
  created new head
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   200
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   201
  $ hg up 44e155eb95c7
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   202
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   203
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   204
  $ hg pick 4e04628911f6
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   205
  picking 9:4e04628911f6 "foo to c"
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   206
  merging c
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   207
  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   208
  unresolved merge conflicts (see hg help resolve)
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   209
  [1]
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   210
  $ echo foobar > c
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   211
  $ hg resolve -m
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   212
  (no more unresolved files)
4052
73e73471d6c6 pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4049
diff changeset
   213
  continue: hg pick --continue
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   214
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   215
  $ hg pick --continue
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   216
  note: picking 9:4e04628911f6 created no changes to commit
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   217
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   218
Testing the abort functionality of hg pick
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   219
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   220
  $ echo foo > b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   221
  $ hg ci -Aqm "foo to b"
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   222
  $ hg glog -r .^::
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   223
  @  10:c437988de89f foo to b
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   224
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   225
  o  8:44e155eb95c7 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   226
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   227
  ~
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   228
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   229
  $ hg pick -r 7c15c05db6fa
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   230
  picking 5:7c15c05db6fa "add b"
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   231
  merging b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   232
  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   233
  unresolved merge conflicts (see hg help resolve)
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   234
  [1]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   235
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   236
  $ hg pick --abort
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   237
  aborting pick, updating to c437988de89f
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   238
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   239
  $ hg glog
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   240
  @  10:c437988de89f foo to b
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   241
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   242
  o  8:44e155eb95c7 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   243
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   244
  o  7:2ccc03d1d096 foo to c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   245
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   246
  | o  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   247
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   248
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   249
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   250
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   251
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   252
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   253
  
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   254
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   255
Trying to grab a public changeset
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   256
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   257
  $ hg phase -r 7c15c05db6fa -p
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   258
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   259
  $ hg pick -r 7c15c05db6fa
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   260
  abort: cannot pick public changesets: 7c15c05db6fa
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   261
  (see 'hg help phases' for details)
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   262
  [255]
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   263
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   264
  $ hg glog
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   265
  @  10:c437988de89f foo to b
3453
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   266
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   267
  o  8:44e155eb95c7 add c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   268
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   269
  o  7:2ccc03d1d096 foo to c
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   270
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   271
  | o  5:7c15c05db6fa add b
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   272
  |/
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   273
  o  4:d46dc301d92f add y
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   274
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   275
  o  3:8e224524cd09 add x
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   276
  |
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   277
  o  0:1f0dee641bb7 add a
32ed5b6fadd3 grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   278
  
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   279
Checking phase preservation while grabbing secret changeset
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   280
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   281
In case of merge conflicts
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   282
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   283
  $ hg phase -r 7c15c05db6fa -s -f
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   284
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   285
  $ hg pick -r 7c15c05db6fa
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   286
  picking 5:7c15c05db6fa "add b"
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   287
  merging b
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   288
  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   289
  unresolved merge conflicts (see hg help resolve)
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   290
  [1]
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   291
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   292
  $ echo bar > b
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   293
  $ hg resolve -m
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   294
  (no more unresolved files)
4052
73e73471d6c6 pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4049
diff changeset
   295
  continue: hg pick --continue
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   296
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   297
  $ hg pick --continue
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   298
  $ hg phase -r .
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   299
  11: secret
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   300
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   301
No merge conflicts
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   302
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   303
  $ hg up d46dc301d92f
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   304
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   305
  $ echo foo > l
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   306
  $ hg add l
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   307
  $ hg ci -qm "added l" --secret
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   308
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   309
  $ hg phase -r .
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   310
  12: secret
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   311
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   312
  $ hg glog
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   313
  @  12:508d572e7053 added l
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   314
  |
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   315
  | o  11:10427de9e26e add b
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   316
  | |
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   317
  | o  10:c437988de89f foo to b
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   318
  | |
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   319
  | o  8:44e155eb95c7 add c
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   320
  | |
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   321
  | o  7:2ccc03d1d096 foo to c
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   322
  |/
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   323
  o  4:d46dc301d92f add y
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   324
  |
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   325
  o  3:8e224524cd09 add x
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   326
  |
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   327
  o  0:1f0dee641bb7 add a
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   328
  
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   329
  $ hg up 10427de9e26e
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   330
  3 files updated, 0 files merged, 1 files removed, 0 files unresolved
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   331
4053
ecbf61d90807 pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4052
diff changeset
   332
  $ hg pick -r 508d572e7053
4049
25981fae92f9 pick: update command output to mention pick instead of grab
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4048
diff changeset
   333
  picking 12:508d572e7053 "added l"
3474
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   334
05fe5239fca2 tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3473
diff changeset
   335
  $ hg phase -r .
3526
df20ddc79064 grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3522
diff changeset
   336
  13: secret