Mercurial > evolve
annotate tests/test-pick.t @ 4687:313565dd75e3 stable
pick: remove transaction on the whole command (issue6037)
At its core, pick is a pretty straightforward and well-behaving command, it
uses functions already in core hg, it checks that wdir is clean and that
changeset to pick is not public, it checks if there happen to be merge
conflicts and can be --continue'd later, etc.
It is very similar to graft in core (it also uses mergemod.graft function), but
it obsoletes the original changeset. However, graft does not experience this
incorrect behavior from issue 6037.
What happens in the test case for this issue when we pick a revision that
touches both "a" and "b": mergemod.graft() takes the original changeset and
tries to apply it to the wdir, which results in "b" being marked as newly added
and ready to be committed, "a" updated with the new content and being marked as
modified, but "a" also has conflicts. Pick correctly notices this and saves its
state before asking for user intervention. So far so good. However, when the
command raises InterventionRequired to print a user-facing message and exit
while being wrapped in repo.transaction() context manager, the latter partially
undoes what mergemod.graft() did: it unmarks "b" as added. And when user
continues pick, "b" is therefore not tracked and is not included in the
resulting commit.
The transaction is not useful here, because it doesn't touch wdir (it's still
dirty), it doesn't remove pickstate (and other commands will refuse to work
until pick --abort or --continue), it just makes "b" untracked.
The solution is to use repo.transaction() only to wrap code that writes data to
hg store in the final stages of the command after all checks have passed and is
not expected to fail on trivial cases like merge conflicts. For example,
committing the picked changeset. But since pick uses repo.commit() for that,
and because that function already uses a transaction, wrapping it in another
transaction doesn't make sense.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 07 Jun 2019 18:14:48 +0800 |
parents | f1466f5ffbf5 |
children | ac079483153a fa534a8c5863 |
rev | line source |
---|---|
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
1 Test for the pick command |
3453
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" |
4686
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
6 > glf = log -GT "{rev}: {desc} ({files})\n" |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 > [extensions] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 > EOF |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 $ 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
|
10 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 $ mkcommit() { |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 > echo "$1" > "$1" |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 > hg add "$1" |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 > 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
|
15 > } |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 $ hg init repo |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 $ cd repo |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
19 $ hg help pick |
4048
d7034826c0a2
pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3527
diff
changeset
|
20 hg pick [-r] rev |
d7034826c0a2
pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3527
diff
changeset
|
21 |
d7034826c0a2
pick: rename the grab command to pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3527
diff
changeset
|
22 aliases: grab |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 |
4229
a8ed26f01c8d
pick: `hg help` was not showing the full cmd desc of `pick`
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
4053
diff
changeset
|
24 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
|
25 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 options: |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 |
4391
054ff759f2fd
pick: add --tool for hg pick to specify mergetool
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
4232
diff
changeset
|
28 -r --rev REV revision to pick |
054ff759f2fd
pick: add --tool for hg pick to specify mergetool
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
4232
diff
changeset
|
29 -c --continue continue interrupted pick |
054ff759f2fd
pick: add --tool for hg pick to specify mergetool
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
4232
diff
changeset
|
30 -a --abort abort interrupted pick |
054ff759f2fd
pick: add --tool for hg pick to specify mergetool
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com>
parents:
4232
diff
changeset
|
31 -t --tool TOOL specify merge tool |
3453
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 (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
|
34 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 $ mkcommit a |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 $ mkcommit b |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
37 $ mkcommit c |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
38 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
39 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 @ 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
|
41 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
42 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
|
43 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 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
|
45 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 Grabbing an ancestor |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
49 $ 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
|
50 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
|
51 [255] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
52 |
3527
7b4d1bfb6b7d
grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3526
diff
changeset
|
53 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
|
54 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
55 $ 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
|
56 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
|
57 [255] |
7b4d1bfb6b7d
grab: gracefully handle the case when we try to grab parent of wdir
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3526
diff
changeset
|
58 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
59 Specifying multiple revisions to pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
61 $ 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
|
62 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
|
63 [255] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
64 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
65 Specifying no revisions to pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
66 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
67 $ hg pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 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
|
69 [255] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
70 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
71 Continuing without interrupted pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
72 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
73 $ 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
|
74 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
|
75 [255] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
76 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
77 Aborting without interrupted pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
78 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
79 $ 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
|
80 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
|
81 [255] |
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 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
|
84 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
85 $ hg up 1f0dee641bb7 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
86 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
|
87 $ 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
|
88 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
|
89 [255] |
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 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
|
92 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
93 $ mkcommit x |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
94 created new head |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
95 $ mkcommit y |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
96 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
97 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
98 @ 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
|
99 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
100 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
|
101 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
102 | 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
|
103 | | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
104 | 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
|
105 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
106 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
|
107 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
108 Grabbing a revision |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
109 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
110 $ 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
|
111 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
|
112 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
|
113 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
114 @ 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
|
115 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
116 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
|
117 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
118 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
|
119 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
120 | * 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
|
121 | | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
122 | 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
|
123 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
124 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
|
125 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
126 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
127 When pick does not create any changes |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
128 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
129 $ 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
|
130 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
|
131 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
132 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
133 @ 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
|
134 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
135 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
|
136 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
137 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
|
138 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
139 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
|
140 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
141 | * 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
|
142 | | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
143 | 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
|
144 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
145 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
|
146 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
147 $ 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
|
148 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
|
149 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
|
150 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
151 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
152 @ 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
|
153 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
154 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
|
155 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
156 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
|
157 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
158 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
|
159 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
160 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
|
161 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
162 interrupted pick |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
163 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
164 $ hg up d46dc301d92f |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
165 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
|
166 $ echo foo > c |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
167 $ 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
|
168 $ 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
|
169 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
|
170 merging c |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
171 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
|
172 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
|
173 [1] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
174 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
175 $ echo foobar > c |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
176 $ 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
|
177 (no more unresolved files) |
4052
73e73471d6c6
pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4049
diff
changeset
|
178 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
|
179 $ 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
|
180 $ hg glog |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
181 @ 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
|
182 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
183 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
|
184 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
185 | 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
|
186 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
187 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
|
188 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
189 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
|
190 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
191 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
|
192 |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
193 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
194 When interrupted pick results in 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
|
195 |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
196 $ hg up d46dc301d92f |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
197 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
|
198 $ echo bar > c |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
199 $ hg add c |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
200 $ 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
|
201 created new head |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
202 |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
203 $ hg up 44e155eb95c7 |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
204 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
|
205 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
206 $ 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
|
207 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
|
208 merging c |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
209 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
|
210 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
|
211 [1] |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
212 $ echo foobar > c |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
213 $ hg resolve -m |
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
214 (no more unresolved files) |
4052
73e73471d6c6
pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4049
diff
changeset
|
215 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
|
216 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
217 $ 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
|
218 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
|
219 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
220 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
|
221 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
222 $ echo foo > b |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
223 $ 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
|
224 $ 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
|
225 @ 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
|
226 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
227 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
|
228 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
229 ~ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
230 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
231 $ 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
|
232 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
|
233 merging b |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
234 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
|
235 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
|
236 [1] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
237 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
238 $ 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
|
239 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
|
240 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
241 $ hg glog |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
242 @ 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
|
243 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
244 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
|
245 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
246 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
|
247 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
248 | 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
|
249 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
250 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
|
251 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
252 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
|
253 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
254 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
|
255 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
256 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
257 Trying to pick a public changeset |
3453
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
258 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
259 $ 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
|
260 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
261 $ 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
|
262 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
|
263 (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
|
264 [255] |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
265 |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
266 $ hg glog |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
267 @ 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
|
268 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
269 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
|
270 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
271 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
|
272 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
273 | 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
|
274 |/ |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
275 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
|
276 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
277 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
|
278 | |
32ed5b6fadd3
grab: add a command to grab a commit and update to it
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
279 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
|
280 |
4484
302cd64f71e1
tests: rename test-grab to test-pick
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4232
diff
changeset
|
281 Checking phase preservation while picking secret changeset |
3474
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 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
|
284 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
285 $ 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
|
286 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
287 $ 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
|
288 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
|
289 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
|
290 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
|
291 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
|
292 [1] |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
293 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
294 $ 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
|
295 $ 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
|
296 (no more unresolved files) |
4052
73e73471d6c6
pick: replace "grabstate" with "pickstate"
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4049
diff
changeset
|
297 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
|
298 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
299 $ 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
|
300 $ 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
|
301 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
|
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 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
|
304 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
305 $ 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
|
306 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
|
307 $ 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
|
308 $ 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
|
309 $ 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
|
310 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
311 $ 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
|
312 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
|
313 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
314 $ hg glog |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
315 @ 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
|
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 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
|
318 | | |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
319 | 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
|
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 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
|
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 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
|
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 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
|
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 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
|
328 | |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
329 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
|
330 |
3526
df20ddc79064
grab: move the initialization of pctx variable outside of if-else
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3522
diff
changeset
|
331 $ 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
|
332 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
|
333 |
4053
ecbf61d90807
pick: replace `hg grab` invocation in test with `hg pick`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
4052
diff
changeset
|
334 $ 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
|
335 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
|
336 |
05fe5239fca2
tests: add a test showing grabbing of secret changeset turn it into draft
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3473
diff
changeset
|
337 $ 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
|
338 13: secret |
4485
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
339 $ cd .. |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
340 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
341 Check pick behavior regarding working copy branch (issue6089) |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
342 ------------------------------------------------------------- |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
343 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
344 The branch of the picked changeset should be preserved, and the working copy updated |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
345 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
346 $ hg init issue6089 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
347 $ cd issue6089 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
348 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
349 $ touch a |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
350 $ hg add a |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
351 $ hg ci -m 'first commit on default' |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
352 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
353 $ hg branch foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
354 marked working directory as branch foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
355 (branches are permanent and global, did you want a bookmark?) |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
356 $ touch b |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
357 $ hg add b |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
358 $ hg ci -m 'first commit on foo' |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
359 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
360 $ hg up default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
361 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
362 $ echo test > a |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
363 $ hg ci -m 'second commit on default' |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
364 $ hg log -G --template '{node|short}: {branch}\n' --rev 'all()+wdir()' |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
365 o ffffffffffff: default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
366 | |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
367 @ 5f07cbf7d111: default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
368 | |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
369 | o 96bb2057779e: foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
370 |/ |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
371 o d03a6bcc83cd: default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
372 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
373 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
374 $ hg pick 1 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
375 picking 1:96bb2057779e "first commit on foo" |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
376 $ hg log --template '{branch}\n' -r tip |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
377 foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
378 $ hg branch |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
379 foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
380 $ hg log -G --template '{node|short}: {branch}\n' --rev 'all()+wdir()' |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
381 o ffffffffffff: foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
382 | |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
383 @ 5344a77549bd: foo |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
384 | |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
385 o 5f07cbf7d111: default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
386 | |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
387 o d03a6bcc83cd: default |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
388 |
e3785a8d0712
pick: update working dir branch (issue6089)
Manuel Jacob <me@manueljacob.de>
parents:
4484
diff
changeset
|
389 $ cd .. |
4686
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
390 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
391 Check that pick doesn't drop files after conflicts occur (issue6037) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
392 -------------------------------------------------------------------- |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
393 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
394 $ hg init issue6037 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
395 $ cd issue6037 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
396 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
397 $ echo apple > a |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
398 $ hg ci -qAm 'apple' |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
399 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
400 $ echo apricot > a |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
401 $ echo banana > b |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
402 $ hg ci -qAm 'apricot and banana' |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
403 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
404 $ echo avocado > a |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
405 $ hg ci -m 'avocado' |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
406 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
407 $ hg glf |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
408 @ 2: avocado (a) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
409 | |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
410 o 1: apricot and banana (a b) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
411 | |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
412 o 0: apple (a) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
413 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
414 Now let's change order of 1 and 2 using pick command |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
415 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
416 $ hg up -r 0 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
417 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
418 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
419 We avoid merge conflict here just to make the test shorter |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
420 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
421 $ hg pick -r 2 --tool :other |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
422 picking 2:f08a1e4a33c4 "avocado" |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
423 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
424 Now we pick revision 1 that touches two files (a and b), merge conflict is expected |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
425 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
426 $ hg pick -r 1 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
427 picking 1:892e123ebf62 "apricot and banana" |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
428 merging a |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
429 warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
430 unresolved merge conflicts (see hg help resolve) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
431 [1] |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
432 $ hg resolve -t :other a |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
433 (no more unresolved files) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
434 continue: hg pick --continue |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
435 $ hg pick --continue |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
436 |
4687
313565dd75e3
pick: remove transaction on the whole command (issue6037)
Anton Shestakov <av6@dwimlabs.net>
parents:
4686
diff
changeset
|
437 Demonstrate that b was not forgotten and is definitely included in 4 |
4686
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
438 |
4687
313565dd75e3
pick: remove transaction on the whole command (issue6037)
Anton Shestakov <av6@dwimlabs.net>
parents:
4686
diff
changeset
|
439 $ hg status b -A |
313565dd75e3
pick: remove transaction on the whole command (issue6037)
Anton Shestakov <av6@dwimlabs.net>
parents:
4686
diff
changeset
|
440 C b |
4686
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
441 $ hg glf |
4687
313565dd75e3
pick: remove transaction on the whole command (issue6037)
Anton Shestakov <av6@dwimlabs.net>
parents:
4686
diff
changeset
|
442 @ 4: apricot and banana (a b) |
4686
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
443 | |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
444 o 3: avocado (a) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
445 | |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
446 o 0: apple (a) |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
447 |
f1466f5ffbf5
tests: demonstrate hg pick forgetting files after conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
4491
diff
changeset
|
448 $ cd .. |