58 -e --edit invoke editor on commit messages |
60 -e --edit invoke editor on commit messages |
59 -l --list list current shelves |
61 -l --list list current shelves |
60 -m --message TEXT use text as shelve message |
62 -m --message TEXT use text as shelve message |
61 -n --name NAME use the given name for the shelved commit |
63 -n --name NAME use the given name for the shelved commit |
62 -p --patch show patch |
64 -p --patch show patch |
|
65 -i --interactive interactive mode, only works while creating a shelve |
63 --stat output diffstat-style summary of changes |
66 --stat output diffstat-style summary of changes |
64 -I --include PATTERN [+] include names matching the given patterns |
67 -I --include PATTERN [+] include names matching the given patterns |
65 -X --exclude PATTERN [+] exclude names matching the given patterns |
68 -X --exclude PATTERN [+] exclude names matching the given patterns |
66 --mq operate on patch repository |
69 --mq operate on patch repository |
67 |
70 |
151 delete our older shelved change |
160 delete our older shelved change |
152 |
161 |
153 $ hg shelve -d default |
162 $ hg shelve -d default |
154 $ hg qfinish -a -q |
163 $ hg qfinish -a -q |
155 |
164 |
|
165 ensure shelve backups aren't overwritten |
|
166 |
|
167 $ ls .hg/shelve-backup/ |
|
168 default-1.hg |
|
169 default-1.patch |
|
170 default.hg |
|
171 default.patch |
|
172 |
156 local edits should not prevent a shelved change from applying |
173 local edits should not prevent a shelved change from applying |
157 |
174 |
158 $ printf "z\na\n" > a/a |
175 $ printf "z\na\n" > a/a |
159 $ hg unshelve --keep |
176 $ hg unshelve --keep |
160 unshelving change 'default-01' |
177 unshelving change 'default-01' |
165 |
182 |
166 $ hg revert --all -q |
183 $ hg revert --all -q |
167 $ rm a/a.orig b.rename/b c.copy |
184 $ rm a/a.orig b.rename/b c.copy |
168 |
185 |
169 apply it and make sure our state is as expected |
186 apply it and make sure our state is as expected |
|
187 |
|
188 (this also tests that same timestamp prevents backups from being |
|
189 removed, even though there are more than 'maxbackups' backups) |
|
190 |
|
191 $ f -t .hg/shelve-backup/default.hg |
|
192 .hg/shelve-backup/default.hg: file |
|
193 $ touch -t 200001010000 .hg/shelve-backup/default.hg |
|
194 $ f -t .hg/shelve-backup/default-1.hg |
|
195 .hg/shelve-backup/default-1.hg: file |
|
196 $ touch -t 200001010000 .hg/shelve-backup/default-1.hg |
170 |
197 |
171 $ hg unshelve |
198 $ hg unshelve |
172 unshelving change 'default-01' |
199 unshelving change 'default-01' |
173 $ hg status -C |
200 $ hg status -C |
174 M a/a |
201 M a/a |
860 a |
910 a |
861 a |
911 a |
862 c |
912 c |
863 x |
913 x |
864 x |
914 x |
865 $ cd .. |
915 |
|
916 shelve --patch and shelve --stat should work with a single valid shelfname |
|
917 |
|
918 $ hg up --clean . |
|
919 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
920 $ hg shelve --list |
|
921 $ echo 'patch a' > shelf-patch-a |
|
922 $ hg add shelf-patch-a |
|
923 $ hg shelve |
|
924 shelved as default |
|
925 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
926 $ echo 'patch b' > shelf-patch-b |
|
927 $ hg add shelf-patch-b |
|
928 $ hg shelve |
|
929 shelved as default-01 |
|
930 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
931 $ hg shelve --patch default default-01 |
|
932 abort: --patch expects a single shelf |
|
933 [255] |
|
934 $ hg shelve --stat default default-01 |
|
935 abort: --stat expects a single shelf |
|
936 [255] |
|
937 $ hg shelve --patch default |
|
938 default (* ago) changes to 'create conflict' (glob) |
|
939 |
|
940 diff --git a/shelf-patch-a b/shelf-patch-a |
|
941 new file mode 100644 |
|
942 --- /dev/null |
|
943 +++ b/shelf-patch-a |
|
944 @@ -0,0 +1,1 @@ |
|
945 +patch a |
|
946 $ hg shelve --stat default |
|
947 default (* ago) changes to 'create conflict' (glob) |
|
948 shelf-patch-a | 1 + |
|
949 1 files changed, 1 insertions(+), 0 deletions(-) |
|
950 $ hg shelve --patch nonexistentshelf |
|
951 abort: cannot find shelf nonexistentshelf |
|
952 [255] |
|
953 $ hg shelve --stat nonexistentshelf |
|
954 abort: cannot find shelf nonexistentshelf |
|
955 [255] |
|
956 |