##// END OF EJS Templates
shelve: new output format for shelve listings...
David Soria Parra -
r19855:a3b28588 default
parent child Browse files
Show More
@@ -160,7 +160,6 b' def createcmd(ui, repo, pats, opts):'
160
160
161 if parent.node() != nullid:
161 if parent.node() != nullid:
162 desc = parent.description().split('\n', 1)[0]
162 desc = parent.description().split('\n', 1)[0]
163 desc = _('shelved from %s (%s): %s') % (label, str(parent)[:8], desc)
164 else:
163 else:
165 desc = '(empty repository)'
164 desc = '(empty repository)'
166
165
@@ -223,7 +222,6 b' def createcmd(ui, repo, pats, opts):'
223
222
224 if ui.formatted():
223 if ui.formatted():
225 desc = util.ellipsis(desc, ui.termwidth())
224 desc = util.ellipsis(desc, ui.termwidth())
226 ui.status(desc + '\n')
227 ui.status(_('shelved as %s\n') % name)
225 ui.status(_('shelved as %s\n') % name)
228 hg.update(repo, parent.node())
226 hg.update(repo, parent.node())
229 finally:
227 finally:
@@ -292,10 +290,10 b' def listcmd(ui, repo, pats, opts):'
292 continue
290 continue
293 ui.write(' ' * (16 - len(sname)))
291 ui.write(' ' * (16 - len(sname)))
294 used = 16
292 used = 16
295 age = '[%s]' % templatefilters.age(util.makedate(mtime))
293 age = '(%s)' % templatefilters.age(util.makedate(mtime), abbrev=True)
296 ui.write(age, label='shelve.age')
294 ui.write(age, label='shelve.age')
297 ui.write(' ' * (18 - len(age)))
295 ui.write(' ' * (12 - len(age)))
298 used += 18
296 used += 12
299 fp = open(name + '.patch', 'rb')
297 fp = open(name + '.patch', 'rb')
300 try:
298 try:
301 while True:
299 while True:
@@ -16,7 +16,6 b''
16 shelving in an empty repo should be possible
16 shelving in an empty repo should be possible
17
17
18 $ hg shelve
18 $ hg shelve
19 (empty repository)
20 shelved as default
19 shelved as default
21 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
20 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
22
21
@@ -44,7 +43,6 b' shelve a change that we will delete late'
44
43
45 $ echo a >> a/a
44 $ echo a >> a/a
46 $ hg shelve
45 $ hg shelve
47 shelved from default (bb4fec6d): second
48 shelved as default
46 shelved as default
49 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
50
48
@@ -74,7 +72,6 b' prevent some foot-shooting'
74 the common case - no options or filenames
72 the common case - no options or filenames
75
73
76 $ hg shelve
74 $ hg shelve
77 shelved from default (bb4fec6d): second
78 shelved as default-01
75 shelved as default-01
79 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
76 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
80 $ hg status -C
77 $ hg status -C
@@ -82,11 +79,11 b' the common case - no options or filename'
82 ensure that our shelved changes exist
79 ensure that our shelved changes exist
83
80
84 $ hg shelve -l
81 $ hg shelve -l
85 default-01 [*] shelved from default (bb4fec6d): second (glob)
82 default-01 (*) second (glob)
86 default [*] shelved from default (bb4fec6d): second (glob)
83 default (*) second (glob)
87
84
88 $ hg shelve -l -p default
85 $ hg shelve -l -p default
89 default [*] shelved from default (bb4fec6d): second (glob)
86 default (*) second (glob)
90
87
91 diff --git a/a/a b/a/a
88 diff --git a/a/a b/a/a
92 --- a/a/a
89 --- a/a/a
@@ -158,7 +155,7 b' expect "a" to no longer be present, but '
158 c
155 c
159 R b/b
156 R b/b
160 $ hg shelve -l --stat
157 $ hg shelve -l --stat
161 wibble [*] wat (glob)
158 wibble (*) wat (glob)
162 a/a | 1 +
159 a/a | 1 +
163 1 files changed, 1 insertions(+), 0 deletions(-)
160 1 files changed, 1 insertions(+), 0 deletions(-)
164
161
@@ -206,11 +203,11 b' force a conflicted merge to occur'
206 ensure that we have a merge with unresolved conflicts
203 ensure that we have a merge with unresolved conflicts
207
204
208 $ hg heads -q
205 $ hg heads -q
209 3:7ec047b69dc0
206 3:6ea6529cfc65
210 2:ceefc37abe1e
207 2:ceefc37abe1e
211 $ hg parents -q
208 $ hg parents -q
212 2:ceefc37abe1e
209 2:ceefc37abe1e
213 3:7ec047b69dc0
210 3:6ea6529cfc65
214 $ hg status
211 $ hg status
215 M a/a
212 M a/a
216 M b.rename/b
213 M b.rename/b
@@ -402,11 +399,10 b' if we resolve a conflict while unshelvin'
402 test keep and cleanup
399 test keep and cleanup
403
400
404 $ hg shelve
401 $ hg shelve
405 shelved from default (be7e7968): create conflict
406 shelved as default
402 shelved as default
407 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
403 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
408 $ hg shelve --list
404 $ hg shelve --list
409 default [*] shelved from default (be7e7968): create conflict (glob)
405 default (*) create conflict (glob)
410 $ hg unshelve --keep
406 $ hg unshelve --keep
411 unshelving change 'default'
407 unshelving change 'default'
412 adding changesets
408 adding changesets
@@ -415,6 +411,6 b' test keep and cleanup'
415 added 1 changesets with 1 changes to 7 files
411 added 1 changesets with 1 changes to 7 files
416 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
412 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
417 $ hg shelve --list
413 $ hg shelve --list
418 default [*] shelved from default (be7e7968): create conflict (glob)
414 default (*) create conflict (glob)
419 $ hg shelve --cleanup
415 $ hg shelve --cleanup
420 $ hg shelve --list
416 $ hg shelve --list
General Comments 0
You need to be logged in to leave comments. Login now