annotate tests/test-shelve.t @ 44209:ae4d729eb3c8

tests: add test showing crash when shelving ghosted rename target When you `hg rename` a file and then delete the rename target, `hg shelve` will give you a traceback. Note that the shelve succeeds and the shelve is correct, it's just the update to the parent that fails (i.e. to the parent of the commit that was created for the shelve). This can be squashed into the next commit if the reviewer prefers. Differential Revision: https://phab.mercurial-scm.org/D8045
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 29 Jan 2020 23:05:02 -0800
parents 4330851947fb
children d0c3eead515a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
1 #testcases stripbased phasebased
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
3 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
4 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
5 > mq =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
6 > [defaults]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
7 > diff = --nodates --git
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
8 > qnew = --date '0 0'
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
9 > [shelve]
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
10 > maxbackups = 2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 22955
diff changeset
11 > EOF
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
12
39519
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
13 #if phasebased
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
14
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
15 $ cat <<EOF >> $HGRCPATH
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
16 > [format]
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
17 > internal-phase = yes
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
18 > EOF
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
19
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
20 #endif
5d69e2412ec8 shelve: use the internal phase when possible
Boris Feld <boris.feld@octobus.net>
parents: 39387
diff changeset
21
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
22 $ hg init repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
23 $ cd repo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
24 $ mkdir a b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
25 $ echo a > a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
26 $ echo b > b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
27 $ echo c > c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
28 $ echo d > d
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
29 $ echo x > x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
30 $ hg addremove -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
31
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
32 shelve has a help message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
33 $ hg shelve -h
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
34 hg shelve [OPTION]... [FILE]...
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
35
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
36 save and set aside changes from the working directory
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
37
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
38 Shelving takes files that "hg status" reports as not clean, saves the
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
39 modifications to a bundle (a shelved change), and reverts the files so
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
40 that their state in the working directory becomes clean.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
41
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
42 To restore these changes to the working directory, using "hg unshelve";
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
43 this will work even if you switch to a different commit.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
44
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
45 When no files are specified, "hg shelve" saves all not-clean files. If
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
46 specific files or directories are named, only changes to those files are
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
47 shelved.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
48
30419
819f96b82fa4 shelve: add missing space in help text
Mads Kiilerich <madski@unity3d.com>
parents: 30152
diff changeset
49 In bare shelve (when no files are specified, without interactive, include
28573
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
50 and exclude option), shelving remembers information if the working
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
51 directory was on newly created branch, in other words working directory
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
52 was on different branch than its first parent. In this situation
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
53 unshelving restores branch information to the working directory.
6a42564081cb shelve: adds restoring newly created branch (issue5048) (BC)
liscju <piotr.listkiewicz@gmail.com>
parents: 28571
diff changeset
54
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
55 Each shelved change has a name that makes it easier to find later. The
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
56 name of a shelved change defaults to being based on the active bookmark,
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
57 or if there is no active bookmark, the current named branch. To specify a
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
58 different name, use "--name".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
59
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
60 To see a list of existing shelved changes, use the "--list" option. For
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
61 each shelved change, this will print its name, age, and description; use "
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
62 --patch" or "--stat" for more details.
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
63
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
64 To delete specific shelved changes, use "--delete". To delete all shelved
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
65 changes, use "--cleanup".
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
66
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
67 options ([+] can be repeated):
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
68
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
69 -A --addremove mark new/missing files as added/removed before
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
70 shelving
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
71 -u --unknown store unknown files in the shelve
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
72 --cleanup delete all shelved changes
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
73 --date DATE shelve with the specified commit date
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
74 -d --delete delete the named shelved change(s)
41010
e8e2a7656e83 help: hide default value for default-off flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 41009
diff changeset
75 -e --edit invoke editor on commit messages
42011
22278dae287c shelve: new keep option
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 41010
diff changeset
76 -k --keep shelve, but keep changes in the working directory
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
77 -l --list list current shelves
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
78 -m --message TEXT use text as shelve message
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
79 -n --name NAME use the given name for the shelved commit
38714
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
80 -p --patch output patches for changes (provide the names of the
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
81 shelved changes as positional arguments)
42623
9eace8d6d537 shelve: modify help text on --interactive
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42616
diff changeset
82 -i --interactive interactive mode
38714
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
83 --stat output diffstat-style summary of changes (provide
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
84 the names of the shelved changes as positional
abcf500d527c shelve: improve help text for --patch and --stat
Danny Hooper <hooper@google.com>
parents: 38619
diff changeset
85 arguments)
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
86 -I --include PATTERN [+] include names matching the given patterns
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
87 -X --exclude PATTERN [+] exclude names matching the given patterns
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
88 --mq operate on patch repository
24477
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
89
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
90 (some details hidden, use --verbose to show complete help)
325f03de849d shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com>
parents: 24233
diff changeset
91
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
92 shelving in an empty repo should be possible
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
93 (this tests also that editor is not invoked, if '--edit' is not
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
94 specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
95
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
96 $ HGEDITOR=cat hg shelve
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
97 shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
98 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
99
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
100 $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
101 unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
102
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
103 $ hg commit -q -m 'initial commit'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
104
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
105 $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
106 nothing changed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
107 [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
108
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
109 make sure shelve files were backed up
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
110
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
111 $ ls .hg/shelve-backup
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
112 default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
113 default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
114 default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
115
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
116 checks to make sure we dont create a directory or
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
117 hidden file while choosing a new shelve name
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
118
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
119 when we are given a name
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
120
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
121 $ hg shelve -n foo/bar
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
122 abort: shelved change names can not contain slashes
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
123 [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
124 $ hg shelve -n .baz
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
125 abort: shelved change names can not start with '.'
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
126 [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
127 $ hg shelve -n foo\\bar
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
128 abort: shelved change names can not contain slashes
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
129 [255]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
130
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
131 when shelve has to choose itself
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
132
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
133 $ hg branch x/y -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
134 $ hg commit -q -m "Branch commit 0"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
135 $ hg shelve
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
136 nothing changed
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
137 [1]
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
138 $ hg branch .x -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
139 $ hg commit -q -m "Branch commit 1"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
140 $ hg shelve
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
141 nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
142 [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
143 $ hg branch x\\y -q
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
144 $ hg commit -q -m "Branch commit 2"
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
145 $ hg shelve
30671
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
146 nothing changed
64a75655b988 shelve: choose a legal shelve name when no name is passed (issue5112)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30670
diff changeset
147 [1]
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
148
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
149 cleaning the branches made for name checking tests
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
150
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
151 $ hg up default -q
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
152 $ hg strip e9177275307e+6a6d231f43d+882bae7c62c2 -q
30670
07fa9765b821 shelve: add tests to ensure illegal shelve names are avoided
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30554
diff changeset
153
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
154 create an mq patch - shelving should work fine with a patch applied
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
155
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
156 $ echo n > n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
157 $ hg add n
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
158 $ hg commit n -m second
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
159 $ hg qnew second.patch
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
160
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
161 shelve a change that we will delete later
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
162
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
163 $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
164 $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
165 shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
166 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
167
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
168 set up some more complex changes to shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
169
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
170 $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
171 $ hg mv b b.rename
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
172 moving b/b to b.rename/b
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
173 $ hg cp c c.copy
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
174 $ hg mv d ghost
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
175 $ rm ghost
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
176 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
177 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
178 A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
179 b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
180 A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
181 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
182 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
183 R d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
184 ! ghost
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
185 d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
186
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
187 the common case - no options or filenames
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
188
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
189 $ hg shelve 2>&1 | grep KeyError
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
190 KeyError: 'No such manifest entry.' (no-pure !)
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
191 raise KeyError (pure !)
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
192 KeyError (pure !)
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
193 # Get out of the broken state so later tests work
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
194 $ hg forget b.rename/b c.copy ghost
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
195 $ hg revert a/a b/b d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
196 $ rm a/a.orig b.rename/b c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
197 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
198
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
199 ensure that our shelved changes exist
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
200
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
201 $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
202 default-01 (*)* changes to: [mq]: second.patch (glob)
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
203 default (*)* changes to: [mq]: second.patch (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
204
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
205 $ hg shelve -l -p default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
206 default (*)* changes to: [mq]: second.patch (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
207
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
208 diff --git a/a/a b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
209 --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
210 +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
211 @@ -1,1 +1,2 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
212 a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
213 +a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
214
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
215 $ hg shelve --list --addremove
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
216 abort: options '--list' and '--addremove' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
217 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
218
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
219 delete our older shelved change
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
220
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
221 $ hg shelve -d default
19856
28b1b7b9b4a9 shelve: allow shelving of a change with an mq patch applied
David Soria Parra <dsp@experimentalworks.net>
parents: 19855
diff changeset
222 $ hg qfinish -a -q
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
223
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
224 ensure shelve backups aren't overwritten
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
225
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
226 $ ls .hg/shelve-backup/
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
227 default-1.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
228 default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
229 default-1.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
230 default.hg
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
231 default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
232 default.shelve
25712
8a6264a2ee60 shelve: always backup shelves instead of deleting them
Colin Chan <colinchan@fb.com>
parents: 25382
diff changeset
233
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
234 local edits should not prevent a shelved change from applying
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
235
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
236 $ printf "z\na\n" > a/a
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
237 $ hg unshelve --keep
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
238 unshelving change 'default-01'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
239 temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
240 rebasing shelved changes
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
241 merging a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
242
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
243 $ hg revert --all -q
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
244 $ rm a/a.orig b.rename/b c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
245
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
246 apply it and make sure our state is as expected
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
247
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
248 (this also tests that same timestamp prevents backups from being
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
249 removed, even though there are more than 'maxbackups' backups)
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
250
30554
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
251 $ f -t .hg/shelve-backup/default.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
252 .hg/shelve-backup/default.patch: file
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
253 $ touch -t 200001010000 .hg/shelve-backup/default.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
254 $ f -t .hg/shelve-backup/default-1.patch
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
255 .hg/shelve-backup/default-1.patch: file
1775975dd439 shelve: move patch extension to a string constant
Kostia Balytskyi <ikostia@fb.com>
parents: 30549
diff changeset
256 $ touch -t 200001010000 .hg/shelve-backup/default-1.patch
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
257
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
258 $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
259 unshelving change 'default-01'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
260 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
261 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
262 A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
263 b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
264 A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
265 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
266 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
267 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
268 $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
269
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
270 (both of default.hg and default-1.hg should be still kept, because it
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
271 is difficult to decide actual order of them from same timestamp)
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
272
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
273 $ ls .hg/shelve-backup/
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
274 default-01.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
275 default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
276 default-01.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
277 default-1.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
278 default-1.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
279 default-1.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
280 default.hg
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
281 default.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
282 default.shelve
25774
4f8c20fe66f0 shelve: keep old backups if timestamp can't decide exact order of them
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25713
diff changeset
283
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
284 $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
285 abort: no shelved changes to apply!
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
286 [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
287 $ hg unshelve foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
288 abort: shelved change 'foo' not found
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
289 [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
290
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
291 named shelves, specific filenames, and "commit messages" should all work
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
292 (this tests also that editor is invoked, if '--edit' is specified)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
293
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
294 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
295 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
296 A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
297 b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
298 A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
299 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
300 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
301 R d
21852
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
302 $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
303 wat
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
304
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
305
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
306 HG: Enter commit message. Lines beginning with 'HG:' are removed.
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
307 HG: Leave message empty to abort commit.
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
308 HG: --
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
309 HG: user: shelve@localhost
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
310 HG: branch 'default'
37a5decc6924 shelve: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21715
diff changeset
311 HG: changed a/a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
312
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
313 expect "a" to no longer be present, but status otherwise unchanged
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
314
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
315 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
316 A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
317 b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
318 A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
319 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
320 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
321 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
322 $ hg shelve -l --stat
19855
a3b285882724 shelve: new output format for shelve listings
David Soria Parra <dsp@experimentalworks.net>
parents: 19854
diff changeset
323 wibble (*) wat (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
324 a/a | 1 +
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
325 1 files changed, 1 insertions(+), 0 deletions(-)
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
326
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
327 and now "a/a" should reappear
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
328
19943
4de116871044 shelve: make unshelve work even if it don't run in repository root
Takumi IINO <trot.thunder@gmail.com>
parents: 19887
diff changeset
329 $ cd a
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
330 $ hg unshelve -q wibble
19943
4de116871044 shelve: make unshelve work even if it don't run in repository root
Takumi IINO <trot.thunder@gmail.com>
parents: 19887
diff changeset
331 $ cd ..
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
332 $ hg status -C
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
333 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
334 A b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
335 b/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
336 A c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
337 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
338 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
339 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
340
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
341 ensure old shelve backups are being deleted automatically
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
342
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
343 $ ls .hg/shelve-backup/
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
344 default-01.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
345 default-01.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
346 default-01.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
347 wibble.hg
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
348 wibble.patch
39372
da121c9dc0f2 shelve: store shelved node in a new data file
Boris Feld <boris.feld@octobus.net>
parents: 38715
diff changeset
349 wibble.shelve
25713
2ca116614cfc shelve: only keep the latest N shelve backups
Colin Chan <colinchan@fb.com>
parents: 25712
diff changeset
350
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
351 cause unshelving to result in a merge with 'a' conflicting
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
352
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
353 $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
354 $ echo c>>a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
355 $ hg commit -m second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
356 $ hg tip --template '{files}\n'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
357 a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
358
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
359 add an unrelated change that should be preserved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
360
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
361 $ mkdir foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
362 $ echo foo > foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
363 $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
364
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
365 force a conflicted merge to occur
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
366
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
367 $ hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
368 unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
369 temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
370 rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
371 merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
372 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
373 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
374 [1]
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
375 $ hg status -v
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
376 M a/a
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
377 M b.rename/b
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
378 M c.copy
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
379 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
380 R d
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
381 ? a/a.orig
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
382 # The repository is in an unfinished *unshelve* state.
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
383
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
384 # Unresolved merge conflicts:
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
385 #
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
386 # a/a
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
387 #
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
388 # To mark files as resolved: hg resolve --mark FILE
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
389
38341
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
390 # To continue: hg unshelve --continue
50f5fc232c16 morestatus: remove some extra spaces
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38338
diff changeset
391 # To abort: hg unshelve --abort
33771
96f43981c1c4 morestatus: move fb extension to core by plugging to `hg status --verbose`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 33542
diff changeset
392
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
393
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
394 ensure that we have a merge with unresolved conflicts
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
395
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
396 #if phasebased
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
397 $ hg heads -q --template '{rev}\n'
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
398 8
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
399 6
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
400 $ hg parents -q --template '{rev}\n'
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
401 8
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
402 6
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
403 #endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
404
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
405 #if stripbased
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
406 $ hg heads -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
407 5
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
408 4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
409 $ hg parents -q --template '{rev}\n'
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
410 4
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
411 5
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
412 #endif
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
413
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
414 $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
415 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
416 M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
417 M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
418 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
419 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
420 ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
421 $ hg diff
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
422 diff --git a/a/a b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
423 --- a/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
424 +++ b/a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
425 @@ -1,2 +1,6 @@
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
426 a
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
427 +<<<<<<< shelve: 2377350b6337 - shelve: pending changes temporary commit
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
428 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
429 +=======
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
430 +a
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
431 +>>>>>>> working-copy: 203c9f771d2b - shelve: changes to: [mq]: second.patch
22905
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
432 diff --git a/b/b b/b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
433 rename from b/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
434 rename to b.rename/b
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
435 diff --git a/c b/c.copy
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
436 copy from c
63e889cc610d rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com>
parents: 22844
diff changeset
437 copy to c.copy
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
438 diff --git a/d b/d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
439 deleted file mode 100644
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
440 --- a/d
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
441 +++ /dev/null
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
442 @@ -1,1 +0,0 @@
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
443 -d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
444 $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
445 U a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
446
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
447 $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
448 abort: unshelve already in progress
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
449 (use 'hg unshelve --continue' or 'hg unshelve --abort')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
450 [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
451
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
452 abort the unshelve and be happy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
453
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
454 $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
455 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
456 M b.rename/b
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
457 M c.copy
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
458 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
459 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
460 ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
461 $ hg unshelve -a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
462 unshelve of 'default' aborted
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
463 $ hg heads -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
464 [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
465 $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
466 changeset: [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
467 tag: tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
468 parent: 3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
469 user: test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
470 date: Thu Jan 01 00:00:00 1970 +0000
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
471 summary: second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
472
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
473 $ hg resolve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
474 $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
475 A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
476 ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
477
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
478 try to continue with no unshelve underway
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
479
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
480 $ hg unshelve -c
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
481 abort: no unshelve in progress
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
482 [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
483 $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
484 A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
485 ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
486
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
487 redo the unshelve to get a conflict
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
488
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
489 $ hg unshelve -q
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
490 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
491 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
492 [1]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
493
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
494 attempt to continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
495
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
496 $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
497 abort: unresolved conflicts, can't continue
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
498 (see 'hg resolve', then 'hg unshelve --continue')
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
499 [255]
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
500
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
501 $ hg revert -r . a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
502 $ hg resolve -m a/a
21947
b081decd9062 resolve: add parenthesis around "no more unresolved files" message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 21852
diff changeset
503 (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
504 continue: hg unshelve --continue
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
505
19963
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
506 $ hg commit -m 'commit while unshelve in progress'
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
507 abort: unshelve already in progress
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
508 (use 'hg unshelve --continue' or 'hg unshelve --abort')
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
509 [255]
6f29cc567845 shelve: disallow commit while unshelve is in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19961
diff changeset
510
28124
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
511 $ hg graft --continue
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
512 abort: no graft in progress
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
513 (continue: hg unshelve --continue)
983365382465 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org>
parents: 27921
diff changeset
514 [255]
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
515 $ hg unshelve -c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
516 unshelve of 'default' complete
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
517
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
518 ensure the repo is as we hope
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
519
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
520 $ hg parents
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
521 changeset: [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
522 tag: tip
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
523 parent: 3:509104101065 (?)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
524 user: test
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
525 date: Thu Jan 01 00:00:00 1970 +0000
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
526 summary: second
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
527
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
528 $ hg heads -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
529 [37]:2e69b451d1ea (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
530
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
531 $ hg status -C
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
532 A b.rename/b
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
533 b/b
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
534 A c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
535 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
536 A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
537 R b/b
44209
ae4d729eb3c8 tests: add test showing crash when shelving ghosted rename target
Martin von Zweigbergk <martinvonz@google.com>
parents: 43728
diff changeset
538 R d
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
539 ? a/a.orig
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
540
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
541 there should be no shelves left
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
542
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
543 $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
544
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
545 #if execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
546
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
547 ensure that metadata-only changes are shelved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
548
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
549 $ chmod +x a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
550 $ hg shelve -q -n execbit a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
551 $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
552 $ hg unshelve -q execbit
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
553 $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
554 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
555 $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
556
39761
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
557 #else
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
558
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
559 Dummy shelve op, to keep rev numbers aligned
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
560
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
561 $ echo foo > a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
562 $ hg shelve -q -n dummy a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
563 $ hg unshelve -q dummy
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
564 $ hg revert a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
565
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
566 #endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
567
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
568 #if symlink
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
569
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
570 $ rm a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
571 $ ln -s foo a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
572 $ hg shelve -q -n symlink a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
573 $ hg status a/a
31021
4189d790e8a4 shelve: add -n/--name option to unshelve (issue5475)
liscju <piotr.listkiewicz@gmail.com>
parents: 30846
diff changeset
574 $ hg unshelve -q -n symlink
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
575 $ hg status a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
576 M a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
577 $ hg revert a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
578
39761
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
579 #else
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
580
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
581 Dummy shelve op, to keep rev numbers aligned
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
582
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
583 $ echo bar > a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
584 $ hg shelve -q -n dummy a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
585 $ hg unshelve -q dummy
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
586 $ hg revert a/a
4675c122157e tests: stabilize test-shelve.t#phasebased for #no-symlink and #no-execbit
Matt Harbison <matt_harbison@yahoo.com>
parents: 39745
diff changeset
587
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
588 #endif
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
589
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
590 set up another conflict between a commit and a shelved change
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
591
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
592 $ hg revert -q -C -a
19961
1d7a36ff2615 shelve: use rebase instead of merge (issue4068)
Durham Goode <durham@fb.com>
parents: 19943
diff changeset
593 $ rm a/a.orig b.rename/b c.copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
594 $ echo a >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
595 $ hg shelve -q
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
596 $ echo x >> a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
597 $ hg ci -m 'create conflict'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
598 $ hg add foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
599
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
600 if we resolve a conflict while unshelving, the unshelve should succeed
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
601
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
602 $ hg unshelve --tool :merge-other --keep
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
603 unshelving change 'default'
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
604 temporarily committing pending changes (restore with 'hg unshelve --abort')
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
605 rebasing shelved changes
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
606 merging a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
607 $ hg parents -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
608 (4|13):33f7f61e6c5e (re)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
609 $ hg shelve -l
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
610 default (*)* changes to: second (glob)
27021
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
611 $ hg status
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
612 M a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
613 A foo/foo
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
614 $ cat a/a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
615 a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
616 c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
617 a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
618 $ cat > a/a << EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
619 > a
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
620 > c
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
621 > x
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
622 > EOF
f2554154509f unshelve: add support for custom merge tools
Siddharth Agarwal <sid0@fb.com>
parents: 27019
diff changeset
623
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
624 $ HGMERGE=true hg unshelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
625 unshelving change 'default'
20413
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
626 temporarily committing pending changes (restore with 'hg unshelve --abort')
0ac94c0a3a38 shelve: status messages from unshelve
Mads Kiilerich <madski@unity3d.com>
parents: 20412
diff changeset
627 rebasing shelved changes
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
628 merging a/a
38618
c829749e7639 shelve: directly handle the initial parent alignment
Boris Feld <boris.feld@octobus.net>
parents: 38465
diff changeset
629 note: unshelved changes already existed in the working copy
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
630 $ hg parents -q
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
631 (4|13):33f7f61e6c5e (re)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
632 $ hg shelve -l
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
633 $ hg status
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
634 A foo/foo
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
635 $ cat a/a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
636 a
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
637 c
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
638 x
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
639
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
640 test keep and cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
641
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
642 $ hg shelve
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
643 shelved as default
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
644 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
645 $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
646 default (*)* changes to: create conflict (glob)
27019
5cf184398ee7 unshelve: add -k as short form of --keep
Siddharth Agarwal <sid0@fb.com>
parents: 26952
diff changeset
647 $ hg unshelve -k
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
648 unshelving change 'default'
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
649 $ hg shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
650 default (*)* changes to: create conflict (glob)
19854
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
651 $ hg shelve --cleanup
49d4919d21c2 shelve: add a shelve extension to save/restore working changes
David Soria Parra <dsp@experimentalworks.net>
parents:
diff changeset
652 $ hg shelve --list
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
653
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
654 $ hg shelve --cleanup --delete
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
655 abort: options '--cleanup' and '--delete' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
656 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
657 $ hg shelve --cleanup --patch
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
658 abort: options '--cleanup' and '--patch' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
659 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
660 $ hg shelve --cleanup --message MESSAGE
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
661 abort: options '--cleanup' and '--message' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
662 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
663
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
664 test bookmarks
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
665
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
666 $ hg bookmark test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
667 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
668 \* test (4|13):33f7f61e6c5e (re)
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
669 $ hg shelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
670 shelved as test
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
671 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
672 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
673 \* test (4|13):33f7f61e6c5e (re)
19874
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
674 $ hg unshelve
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
675 unshelving change 'test'
5836edcbdc2e shelve: copy bookmarks and restore them after a commit
David Soria Parra <dsp@experimentalworks.net>
parents: 19856
diff changeset
676 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
677 \* test (4|13):33f7f61e6c5e (re)
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
678
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
679 shelve should still work even if mq is disabled
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
680
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
681 $ hg --config extensions.mq=! shelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
682 shelved as test
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
683 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
684 $ hg --config extensions.mq=! shelve --list
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
685 test (*)* changes to: create conflict (glob)
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
686 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
687 \* test (4|13):33f7f61e6c5e (re)
19885
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
688 $ hg --config extensions.mq=! unshelve
6cc696179869 shelve: only save mq state if enabled
Sean Farley <sean.michael.farley@gmail.com>
parents: 19874
diff changeset
689 unshelving change 'test'
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
690 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
691 \* test (4|13):33f7f61e6c5e (re)
19887
dd7c294365f0 shelve: fix dirstate corruption during unshelve (issue4055)
Durham Goode <durham@fb.com>
parents: 19885
diff changeset
692
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
693 Recreate some conflict again
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
694
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
695 $ hg up -C -r 2e69b451d1ea
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
696 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
697 (leaving bookmark test)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
698 $ echo y >> a/a
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
699 $ hg shelve
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
700 shelved as default
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
701 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
702 $ hg up test
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
703 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
704 (activating bookmark test)
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
705 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
706 \* test (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
707 $ hg unshelve
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
708 unshelving change 'default'
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
709 rebasing shelved changes
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
710 merging a/a
26614
ef1eb6df7071 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com>
parents: 26520
diff changeset
711 warning: conflicts while merging a/a! (edit, then use 'hg resolve --mark')
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
712 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
713 [1]
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
714 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
715 test (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
716
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
717 Test that resolving all conflicts in one direction (so that the rebase
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
718 is a no-op), works (issue4398)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
719
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
720 $ hg revert -a -r .
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 35230
diff changeset
721 reverting a/a
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
722 $ hg resolve -m a/a
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
723 (no more unresolved files)
27694
2dc363274702 shelve: hook afterresolvedstates
timeless <timeless@mozdev.org>
parents: 27092
diff changeset
724 continue: hg unshelve --continue
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
725 $ hg unshelve -c
38463
f4776f8b98e0 shelve: directly handle `--continue`
Boris Feld <boris.feld@octobus.net>
parents: 38462
diff changeset
726 note: unshelved changes already existed in the working copy
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
727 unshelve of 'default' complete
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
728 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
729 \* test (4|13):33f7f61e6c5e (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
730 $ hg diff
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
731 $ hg status
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
732 ? a/a.orig
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
733 ? foo/foo
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
734 $ hg summary
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
735 parent: (4|13):33f7f61e6c5e tip (re)
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
736 create conflict
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
737 branch: default
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
738 bookmarks: *test
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
739 commit: 2 unknown (clean)
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
740 update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25260
diff changeset
741 phases: 5 draft
22842
d43d116a118c shelve: don't delete "." when rebase is a no-op (issue4398)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 21947
diff changeset
742
21715
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
743 $ hg shelve --delete --stat
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
744 abort: options '--delete' and '--stat' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
745 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
746 $ hg shelve --delete --name NAME
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
747 abort: options '--delete' and '--name' may not be used together
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
748 [255]
3eb43b706174 shelve: add option combination tests for refactoring in succeeding patch
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21693
diff changeset
749
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
750 Test interactive shelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
751 $ cat <<EOF >> $HGRCPATH
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
752 > [ui]
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
753 > interactive = true
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
754 > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
755 $ echo 'a' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
756 $ cat a/a >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
757 $ echo 'x' >> a/b
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
758 $ mv a/b a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
759 $ echo 'a' >> foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
760 $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
761 M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
762 ? a/a.orig
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
763 ? foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
764 $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
765 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
766 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
767 c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
768 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
769 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
770 $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
771 foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
772 a
25799
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
773 $ hg shelve --interactive --config ui.interactive=false
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
774 abort: running non-interactively
0eb093e40813 shelve: omit incorrect 'commit' suggestion at 'hg shelve -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25774
diff changeset
775 [255]
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
776 $ hg shelve --interactive << EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
777 > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
778 > y
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
779 > n
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
780 > EOF
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
781 diff --git a/a/a b/a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
782 2 hunks, 2 lines changed
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
783 examine changes to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
784 (enter ? for help) [Ynesfdaq?] y
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
785
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
786 @@ -1,3 +1,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
787 +a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
788 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
789 c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
790 x
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
791 record change 1/2 to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
792 (enter ? for help) [Ynesfdaq?] y
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
793
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
794 @@ -1,3 +2,4 @@
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
795 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
796 c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
797 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
798 +x
42566
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
799 record change 2/2 to 'a/a'?
f802a75da585 patch: use a short, fixed-size message for last line of prompt (issue6158)
Kyle Lippincott <spectral@google.com>
parents: 42541
diff changeset
800 (enter ? for help) [Ynesfdaq?] n
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
801
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
802 shelved as test
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
803 merging a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
804 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
805 $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
806 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
807 c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
808 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
809 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
810 $ cat foo/foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
811 foo
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
812 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
813 $ hg st
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
814 M a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
815 ? foo/foo
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
816 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
817 \* test (4|13):33f7f61e6c5e (re)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
818 $ hg unshelve
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
819 unshelving change 'test'
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
820 temporarily committing pending changes (restore with 'hg unshelve --abort')
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
821 rebasing shelved changes
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
822 merging a/a
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
823 $ hg bookmark
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
824 \* test (4|13):33f7f61e6c5e (re)
24478
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
825 $ cat a/a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
826 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
827 a
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
828 c
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
829 x
95cbc77c0cad shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com>
parents: 24477
diff changeset
830 x
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
831
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
832 shelve --patch and shelve --stat should work with valid shelfnames
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
833
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
834 $ hg up --clean .
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
835 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26520
46dec89fe888 bookmarks: use recordchange instead of writing if transaction is active
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26507
diff changeset
836 (leaving bookmark test)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
837 $ hg shelve --list
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
838 $ echo 'patch a' > shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
839 $ hg add shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
840 $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
841 shelved as default
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
842 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
843 $ echo 'patch b' > shelf-patch-b
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
844 $ hg add shelf-patch-b
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
845 $ hg shelve
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
846 shelved as default-01
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
847 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
848 $ hg shelve --patch default default-01
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
849 default-01 (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
850
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
851 diff --git a/shelf-patch-b b/shelf-patch-b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
852 new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
853 --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
854 +++ b/shelf-patch-b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
855 @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
856 +patch b
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
857 default (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
858
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
859 diff --git a/shelf-patch-a b/shelf-patch-a
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
860 new file mode 100644
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
861 --- /dev/null
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
862 +++ b/shelf-patch-a
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
863 @@ -0,0 +1,1 @@
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
864 +patch a
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
865 $ hg shelve --stat default default-01
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
866 default-01 (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
867 shelf-patch-b | 1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
868 1 files changed, 1 insertions(+), 0 deletions(-)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
869 default (*)* changes to: create conflict (glob)
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
870 shelf-patch-a | 1 +
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
871 1 files changed, 1 insertions(+), 0 deletions(-)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
872 $ hg shelve --patch default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
873 default (*)* changes to: create conflict (glob)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
874
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
875 diff --git a/shelf-patch-a b/shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
876 new file mode 100644
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
877 --- /dev/null
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
878 +++ b/shelf-patch-a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
879 @@ -0,0 +1,1 @@
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
880 +patch a
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
881 $ hg shelve --stat default
27092
156985f2dec0 shelve: use colon instead of quotes in 'changes to' description
Siddharth Agarwal <sid0@fb.com>
parents: 27021
diff changeset
882 default (*)* changes to: create conflict (glob)
25104
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
883 shelf-patch-a | 1 +
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
884 1 files changed, 1 insertions(+), 0 deletions(-)
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
885 $ hg shelve --patch nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
886 abort: cannot find shelf nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
887 [255]
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
888 $ hg shelve --stat nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
889 abort: cannot find shelf nonexistentshelf
d6453f6fbdba shelve: allow --patch and --stat without --list for a single shelf
Tony Tung <tonytung@fb.com>
parents: 24872
diff changeset
890 [255]
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
891 $ hg shelve --patch default nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
892 abort: cannot find shelf nonexistentshelf
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
893 [255]
38715
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
894
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
895 when the user asks for a patch, we assume they want the most recent shelve if
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
896 they don't provide a shelve name
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
897
30823
806a830e6612 shelve: allow multiple shelves with --patch and --stat
Pulkit Goyal <7895pulkit@gmail.com>
parents: 30671
diff changeset
898 $ hg shelve --patch
38715
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
899 default-01 (*)* changes to: create conflict (glob)
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
900
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
901 diff --git a/shelf-patch-b b/shelf-patch-b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
902 new file mode 100644
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
903 --- /dev/null
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
904 +++ b/shelf-patch-b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
905 @@ -0,0 +1,1 @@
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
906 +patch b
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
907
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
908 $ cd ..
905b66681004 shelve: pick the most recent shelve if none specified for --patch/--stat
Danny Hooper <hooper@google.com>
parents: 38714
diff changeset
909
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
910 Shelve from general delta repo uses bundle2 on disk
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
911 --------------------------------------------------
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
912
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
913 no general delta
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
914
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
915 $ hg clone --pull repo bundle1 --config format.usegeneraldelta=0
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
916 requesting all changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
917 adding changesets
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
918 adding manifests
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
919 adding file changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
920 added 5 changesets with 8 changes to 6 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34198
diff changeset
921 new changesets cc01e2b0c59f:33f7f61e6c5e
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
922 updating to branch default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
923 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
924 $ cd bundle1
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
925 $ echo babar > jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
926 $ hg add jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
927 $ hg shelve
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
928 shelved as default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
929 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
930 $ hg debugbundle .hg/shelved/*.hg
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
931 330882a04d2ce8487636b1fb292e5beea77fa1e3
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
932 $ cd ..
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
933
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
934 with general delta
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
935
26914
6839f2d4eea7 test: enforce generaldelta format with the right option
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26776
diff changeset
936 $ hg clone --pull repo bundle2 --config format.usegeneraldelta=1
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
937 requesting all changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
938 adding changesets
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
939 adding manifests
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
940 adding file changes
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
941 added 5 changesets with 8 changes to 6 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34198
diff changeset
942 new changesets cc01e2b0c59f:33f7f61e6c5e
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
943 updating to branch default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
944 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
945 $ cd bundle2
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
946 $ echo babar > jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
947 $ hg add jungle
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
948 $ hg shelve
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
949 shelved as default
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
950 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
951 $ hg debugbundle .hg/shelved/*.hg
34025
626a28f30dbd debugcommands: stabilize output of debugbundle by having a custom repr
Augie Fackler <raf@durin42.com>
parents: 33773
diff changeset
952 Stream params: {Compression: BZ}
37841
d618558e4e8b debugbundle: also display if a part is mandatory or advisory
Boris Feld <boris.feld@octobus.net>
parents: 37742
diff changeset
953 changegroup -- {nbchanges: 1, version: 02} (mandatory: True)
39376
5f8282f368b2 shelve: add an "internal" extra
Boris Feld <boris.feld@octobus.net>
parents: 39372
diff changeset
954 330882a04d2ce8487636b1fb292e5beea77fa1e3
42013
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
955
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
956 Test shelve --keep
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
957
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
958 $ hg unshelve
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
959 unshelving change 'default'
42020
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
960 $ hg shelve --keep --list
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
961 abort: options '--list' and '--keep' may not be used together
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
962 [255]
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
963 $ hg shelve --keep --patch
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
964 abort: options '--patch' and '--keep' may not be used together
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
965 [255]
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
966 $ hg shelve --keep --delete
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
967 abort: options '--delete' and '--keep' may not be used together
00c1ee0f746a shelve: add --keep to list of allowables
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42013
diff changeset
968 [255]
42013
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
969 $ hg shelve --keep
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
970 shelved as default
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
971 $ hg diff
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
972 diff --git a/jungle b/jungle
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
973 new file mode 100644
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
974 --- /dev/null
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
975 +++ b/jungle
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
976 @@ -0,0 +1,1 @@
50d5e64ec561 shelve: do not update when keeping changes, just move the dirstate
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 42011
diff changeset
977 +babar
43728
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
978
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
979 Test shelve --delete
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
980
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
981 $ hg shelve --list
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
982 default (*s ago) changes to: create conflict (glob)
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
983 $ hg shelve --delete doesnotexist
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
984 abort: shelved change 'doesnotexist' not found
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
985 [255]
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
986 $ hg shelve --delete default
4330851947fb tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org>
parents: 42761
diff changeset
987
26507
ae29cffa05db shelve: bundle using bundle2 if repository is general delta (issue4862)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25799
diff changeset
988 $ cd ..
26681
ca8170b5d370 shelve: delete shelve statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com>
parents: 26614
diff changeset
989
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
990 Test visibility of in-memory changes inside transaction to external hook
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
991 ------------------------------------------------------------------------
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
992
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
993 $ cd repo
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
994
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
995 $ echo xxxx >> x
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
996 $ hg commit -m "#5: changes to invoke rebase"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
997
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
998 $ cat > $TESTTMP/checkvisibility.sh <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
999 > echo "==== \$1:"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1000 > hg parents --template "VISIBLE {rev}:{node|short}\n"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1001 > # test that pending changes are hidden
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1002 > unset HG_PENDING
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1003 > hg parents --template "ACTUAL {rev}:{node|short}\n"
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1004 > echo "===="
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1005 > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1006
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1007 $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1008 > [defaults]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1009 > # to fix hash id of temporary revisions
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1010 > unshelve = --date '0 0'
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1011 > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1012
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1013 "hg unshelve" at REV5 implies steps below:
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1014
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1015 (1) commit changes in the working directory (REV6)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1016 (2) unbundle shelved revision (REV7)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1017 (3) rebase: merge REV7 into REV6 (REV6 => REV6, REV7)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1018 (4) rebase: commit merged revision (REV8)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1019 (5) rebase: update to REV6 (REV8 => REV6)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1020 (6) update to REV5 (REV6 => REV5)
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1021 (7) abort transaction
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1022
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1023 == test visibility to external preupdate hook
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1024
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1025 $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1026 > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1027 > preupdate.visibility = sh $TESTTMP/checkvisibility.sh preupdate
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1028 > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1029
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1030 $ echo nnnn >> n
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1031
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1032 $ sh $TESTTMP/checkvisibility.sh before-unshelving
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1033 ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1034 VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1035 ACTUAL (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1036 ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1037
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1038 $ hg unshelve --keep default
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1039 temporarily committing pending changes (restore with 'hg unshelve --abort')
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1040 rebasing shelved changes
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1041 ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1042 VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1043 ACTUAL (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1044 ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1045 ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1046 VISIBLE (8|21):8efe6f7537dc (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1047 ACTUAL (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1048 ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1049 ==== preupdate:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1050 VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1051 ACTUAL (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1052 ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1053
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1054 $ cat >> .hg/hgrc <<EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1055 > [hooks]
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1056 > preupdate.visibility =
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1057 > EOF
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1058
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1059 $ sh $TESTTMP/checkvisibility.sh after-unshelving
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1060 ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1061 VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1062 ACTUAL (5|19):703117a2acfb (re)
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1063 ====
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1064
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1065 == test visibility to external update hook
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1066
38337
756a7682837f shelve: use full hash in tests
Boris Feld <boris.feld@octobus.net>
parents: 37841
diff changeset
1067 $ hg update -q -C 703117a2acfb
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1068
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1069 $ cat >> .hg/hgrc <<EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1070 > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1071 > update.visibility = sh $TESTTMP/checkvisibility.sh update
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1072 > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1073
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1074 $ echo nnnn >> n
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1075
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1076 $ sh $TESTTMP/checkvisibility.sh before-unshelving
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1077 ==== before-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1078 VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1079 ACTUAL (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1080 ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1081
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1082 $ hg unshelve --keep default
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1083 temporarily committing pending changes (restore with 'hg unshelve --abort')
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1084 rebasing shelved changes
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1085 ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1086 VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1087 VISIBLE 1?7:492ed9d705e5 (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1088 ACTUAL (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1089 ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1090 ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1091 VISIBLE (6|20):54c00d20fb3f (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1092 ACTUAL (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1093 ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1094 ==== update:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1095 VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1096 ACTUAL (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1097 ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1098
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1099 $ cat >> .hg/hgrc <<EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1100 > [hooks]
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1101 > update.visibility =
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1102 > EOF
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1103
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1104 $ sh $TESTTMP/checkvisibility.sh after-unshelving
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1105 ==== after-unshelving:
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1106 VISIBLE (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1107 ACTUAL (5|19):703117a2acfb (re)
26752
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1108 ====
949e8c626d19 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26751
diff changeset
1109
26751
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1110 $ cd ..
520defbc0335 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26681
diff changeset
1111
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1112 Keep active bookmark while (un)shelving even on shared repo (issue4940)
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1113 -----------------------------------------------------------------------
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1114
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1115 $ cat <<EOF >> $HGRCPATH
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1116 > [extensions]
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1117 > share =
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1118 > EOF
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1119
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1120 $ hg bookmarks -R repo
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1121 test (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1122 $ hg share -B repo share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1123 updating working directory
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1124 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1125 $ cd share
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1126
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1127 $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1128 test (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1129 $ hg bookmarks foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1130 $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1131 \* foo (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1132 test (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1133 $ echo x >> x
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1134 $ hg shelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1135 shelved as foo
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1137 $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1138 \* foo (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1139 test (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1140
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1141 $ hg unshelve
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1142 unshelving change 'foo'
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1143 $ hg bookmarks
39744
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1144 \* foo (5|19):703117a2acfb (re)
52dfa1eb0ad4 shelve: no longer strip internal commit when using internal phase
Boris Feld <boris.feld@octobus.net>
parents: 39519
diff changeset
1145 test (4|13):33f7f61e6c5e (re)
26933
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1146
a7eecd021782 share: wrap bmstore._writerepo for transaction sensitivity (issue4940)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 26776
diff changeset
1147 $ cd ..
42050
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1148
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1149 Abort unshelve while merging (issue5123)
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1150 ----------------------------------------
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1151
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1152 $ hg init issue5123
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1153 $ cd issue5123
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1154 $ echo > a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1155 $ hg ci -Am a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1156 adding a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1157 $ hg co null
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1158 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1159 $ echo > b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1160 $ hg ci -Am b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1161 adding b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1162 created new head
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1163 $ echo > c
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1164 $ hg add c
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1165 $ hg shelve
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1166 shelved as default
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1167 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1168 $ hg co 1
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1169 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1170 $ hg merge 0
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1171 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1172 (branch merge, don't forget to commit)
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1173 -- successful merge with two parents
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1174 $ hg log -G
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1175 @ changeset: 1:406bf70c274f
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1176 tag: tip
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1177 parent: -1:000000000000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1178 user: test
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1179 date: Thu Jan 01 00:00:00 1970 +0000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1180 summary: b
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1181
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1182 @ changeset: 0:ada8c9eb8252
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1183 user: test
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1184 date: Thu Jan 01 00:00:00 1970 +0000
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1185 summary: a
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1186
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1187 -- trying to pull in the shelve bits
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1188 -- unshelve should abort otherwise, it'll eat my second parent.
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1189 $ hg unshelve
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 42050
diff changeset
1190 abort: outstanding uncommitted merge
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 42050
diff changeset
1191 (use 'hg commit' or 'hg merge --abort')
42050
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1192 [255]
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1193
03f6480bfdda unshelve: disable unshelve during merge (issue5123)
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42020
diff changeset
1194 $ cd ..
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1195
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1196 -- test for interactive mode on unshelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1197
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1198 $ hg init a
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1199 $ cd a
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1200 $ echo > b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1201 $ hg ci -Am b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1202 adding b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1203 $ echo > c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1204 $ echo > d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1205 $ hg add .
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1206 adding c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1207 adding d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1208 $ hg shelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1209 shelved as default
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1210 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1211 $ echo > e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1212 $ hg add e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1213 $ hg ci -m e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1214 $ hg shelve --patch
42626
944604118c0f tests: glob over some timing numbers in test-shelve.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 42623
diff changeset
1215 default (*s ago) changes to: b (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1216
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1217 diff --git a/c b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1218 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1219 --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1220 +++ b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1221 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1222 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1223 diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1224 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1225 --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1226 +++ b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1227 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1228 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1229 $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1230 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1231 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1232 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1233 > n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1234 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1235 unshelving change 'default'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1236 rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1237 diff --git a/c b/c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1238 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1239 examine changes to 'c'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1240 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1241
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1242 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1243 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1244 record change 1/2 to 'c'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1245 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1246
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1247 diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1248 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1249 examine changes to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1250 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1251
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1252 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1253 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1254 record change 2/2 to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1255 (enter ? for help) [Ynesfdaq?] n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1256
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1257 $ ls
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1258 b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1259 c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1260 e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1261 -- shelve should not contain `c` now
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1262 $ hg shelve --patch
42626
944604118c0f tests: glob over some timing numbers in test-shelve.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 42623
diff changeset
1263 default (*s ago) changes to: b (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1264
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1265 diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1266 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1267 --- /dev/null
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1268 +++ b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1269 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1270 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1271 $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1272 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1273 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1274 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1275 unshelving change 'default'
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1276 temporarily committing pending changes (restore with 'hg unshelve --abort')
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1277 rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1278 diff --git a/d b/d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1279 new file mode 100644
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1280 examine changes to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1281 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1282
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1283 @@ -0,0 +1,1 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1284 +
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1285 record this change to 'd'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1286 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1287
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1288
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1289 $ hg status -v
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1290 A c
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1291 A d
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1292 $ ls
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1293 b
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1294 c
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1295 d
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1296 e
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1297 $ hg shelve --list
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1298
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1299 -- now, unshelve selected changes from a file
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1300
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1301 $ echo B > foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1302 $ hg add foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1303 $ hg ci -m 'add B to foo'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1304 $ cat > foo <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1305 > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1306 > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1307 > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1308 > EOF
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1309 $ echo > garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1310 $ hg st
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1311 M foo
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1312 ? garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1313 $ hg shelve --unknown
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1314 shelved as default
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1315 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1316 $ cat foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1317 B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1318 $ hg unshelve -i <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1319 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1320 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1321 > n
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1322 > y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1323 > y
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1324 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1325 unshelving change 'default'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1326 rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1327 diff --git a/foo b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1328 2 hunks, 2 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1329 examine changes to 'foo'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1330 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1331
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1332 @@ -1,1 +1,2 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1333 +A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1334 B
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1335 record change 1/3 to 'foo'?
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1336 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1337
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1338 @@ -1,1 +2,2 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1339 B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1340 +C
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1341 record change 2/3 to 'foo'?
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1342 (enter ? for help) [Ynesfdaq?] n
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1343
42733
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1344 diff --git a/garbage b/garbage
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1345 new file mode 100644
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1346 examine changes to 'garbage'?
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1347 (enter ? for help) [Ynesfdaq?] y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1348
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1349 @@ -0,0 +1,1 @@
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1350 +
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1351 record change 3/3 to 'garbage'?
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1352 (enter ? for help) [Ynesfdaq?] y
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1353
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1354 $ hg st
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1355 M foo
d684449eef67 unshelve: forget unknown files after a partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42704
diff changeset
1356 ? garbage
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1357 $ cat foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1358 A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1359 B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1360 $ hg shelve --patch
42626
944604118c0f tests: glob over some timing numbers in test-shelve.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 42623
diff changeset
1361 default (*s ago) changes to: add B to foo (glob)
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1362
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1363 diff --git a/foo b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1364 --- a/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1365 +++ b/foo
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1366 @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1367 A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1368 B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1369 +C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1370
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1371 -- unshelve interactive on conflicts
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1372
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1373 $ echo A >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1374 $ echo A >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1375 $ hg add bar1 bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1376 $ hg ci -m 'add A to bars'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1377 $ echo B >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1378 $ echo B >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1379 $ hg shelve
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1380 shelved as default-01
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1381 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1382 $ echo C >> bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1383 $ echo C >> bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1384 $ hg ci -m 'add C to bars'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1385 $ hg unshelve -i
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1386 unshelving change 'default-01'
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1387 rebasing shelved changes
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1388 merging bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1389 merging bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1390 warning: conflicts while merging bar1! (edit, then use 'hg resolve --mark')
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1391 warning: conflicts while merging bar2! (edit, then use 'hg resolve --mark')
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1392 unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1393 [1]
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1394
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1395 $ cat > bar1 <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1396 > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1397 > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1398 > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1399 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1400 $ cat > bar2 <<EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1401 > A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1402 > B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1403 > C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1404 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1405 $ hg resolve -m bar1 bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1406 (no more unresolved files)
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1407 continue: hg unshelve --continue
42668
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1408
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1409 -- using --continue with --interactive should throw an error
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1410 $ hg unshelve --continue -i
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1411 abort: cannot use both continue and interactive
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1412 [255]
52a383451739 unshelve: add abort on using continue and interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42662
diff changeset
1413
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1414 $ cat bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1415 A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1416 B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1417 C
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1418
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1419 #if stripbased
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1420 $ hg log -r 3:: -G
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1421 @ changeset: 5:f1d5f53e397b
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1422 | tag: tip
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1423 | parent: 3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1424 | user: shelve@localhost
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1425 | date: Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1426 | summary: changes to: add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1427 |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1428 | @ changeset: 4:fe451a778c81
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1429 |/ user: test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1430 | date: Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1431 | summary: add C to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1432 |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1433 o changeset: 3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1434 | user: test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1435 ~ date: Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1436 summary: add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1437
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1438 #endif
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1439
42662
ee86ad6f50fe unshelve: store information about interactive mode in shelvedstate
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42626
diff changeset
1440 $ hg unshelve --continue <<EOF
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1441 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1442 > y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1443 > y
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1444 > n
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1445 > EOF
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1446 diff --git a/bar1 b/bar1
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1447 1 hunks, 1 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1448 examine changes to 'bar1'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1449 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1450
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1451 @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1452 A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1453 +B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1454 C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1455 record change 1/2 to 'bar1'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1456 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1457
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1458 diff --git a/bar2 b/bar2
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1459 1 hunks, 1 lines changed
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1460 examine changes to 'bar2'?
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1461 (enter ? for help) [Ynesfdaq?] y
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1462
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1463 @@ -1,2 +1,3 @@
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1464 A
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1465 +B
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1466 C
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1467 record change 2/2 to 'bar2'?
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1468 (enter ? for help) [Ynesfdaq?] n
42616
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1469
5162753c4c14 unshelve: add interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42566
diff changeset
1470 unshelve of 'default-01' complete
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1471
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1472 #if stripbased
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1473 $ hg log -r 3:: -G
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1474 @ changeset: 4:fe451a778c81
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1475 | tag: tip
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1476 | user: test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1477 | date: Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1478 | summary: add C to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1479 |
42704
6957f7b93e03 unshelve: clear shelvedstate and _finishunshelve() on partial unshelve
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42703
diff changeset
1480 o changeset: 3:e28fd7fa7938
42702
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1481 | user: test
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1482 ~ date: Thu Jan 01 00:00:00 1970 +0000
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1483 summary: add A to bars
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1484
4814d993fe21 unshelve: handle stripping changesets on interactive mode
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42668
diff changeset
1485 #endif
42703
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1486
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1487 $ hg unshelve --continue
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1488 abort: no unshelve in progress
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1489 [255]
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1490
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1491 $ hg shelve --list
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1492 default-01 (*)* changes to: add A to bars (glob)
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1493 default (*)* changes to: add B to foo (glob)
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1494 $ hg unshelve -n default-01 -i <<EOF
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1495 > y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1496 > y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1497 > EOF
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1498 temporarily committing pending changes (restore with 'hg unshelve --abort')
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1499 rebasing shelved changes
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1500 diff --git a/bar2 b/bar2
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1501 1 hunks, 1 lines changed
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1502 examine changes to 'bar2'?
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1503 (enter ? for help) [Ynesfdaq?] y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1504
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1505 @@ -1,2 +1,3 @@
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1506 A
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1507 +B
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1508 C
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1509 record this change to 'bar2'?
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1510 (enter ? for help) [Ynesfdaq?] y
073cfff9aaef unshelve: delete shelvedstate after a successful unshelve --continue
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42702
diff changeset
1511
42761
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
1512 -- test for --interactive --keep
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
1513 $ hg unshelve -i --keep
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
1514 abort: --keep on --interactive is not yet supported
5c285c8e4f98 unshelve: abort on using --keep and --interactive together
Navaneeth Suresh <navaneeths1998@gmail.com>
parents: 42733
diff changeset
1515 [255]