Show More
@@ -420,14 +420,11 b' def _nothingtoshelvemessaging(ui, repo, ' | |||||
420 | else: |
|
420 | else: | |
421 | ui.status(_("nothing changed\n")) |
|
421 | ui.status(_("nothing changed\n")) | |
422 |
|
422 | |||
423 | def _shelvecreatedcommit(repo, node, name): |
|
423 | def _shelvecreatedcommit(repo, node, name, match): | |
424 | info = {'node': nodemod.hex(node)} |
|
424 | info = {'node': nodemod.hex(node)} | |
425 | shelvedfile(repo, name, 'shelve').writeinfo(info) |
|
425 | shelvedfile(repo, name, 'shelve').writeinfo(info) | |
426 | bases = list(mutableancestors(repo[node])) |
|
426 | bases = list(mutableancestors(repo[node])) | |
427 | shelvedfile(repo, name, 'hg').writebundle(bases, node) |
|
427 | shelvedfile(repo, name, 'hg').writebundle(bases, node) | |
428 | # Create a matcher so that prefetch doesn't attempt to fetch the entire |
|
|||
429 | # repository pointlessly. |
|
|||
430 | match = scmutil.matchfiles(repo, repo[node].files()) |
|
|||
431 | with shelvedfile(repo, name, patchextension).opener('wb') as fp: |
|
428 | with shelvedfile(repo, name, patchextension).opener('wb') as fp: | |
432 | cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True), |
|
429 | cmdutil.exportfile(repo, [node], fp, opts=mdiff.diffopts(git=True), | |
433 | match=match) |
|
430 | match=match) | |
@@ -501,7 +498,10 b' def _docreatecmd(ui, repo, pats, opts):' | |||||
501 | _nothingtoshelvemessaging(ui, repo, pats, opts) |
|
498 | _nothingtoshelvemessaging(ui, repo, pats, opts) | |
502 | return 1 |
|
499 | return 1 | |
503 |
|
500 | |||
504 | _shelvecreatedcommit(repo, node, name) |
|
501 | # Create a matcher so that prefetch doesn't attempt to fetch | |
|
502 | # the entire repository pointlessly | |||
|
503 | match = scmutil.matchfiles(repo, repo[node].files()) | |||
|
504 | _shelvecreatedcommit(repo, node, name, match) | |||
505 |
|
505 | |||
506 | if ui.formatted(): |
|
506 | if ui.formatted(): | |
507 | desc = stringutil.ellipsis(desc, ui.termwidth()) |
|
507 | desc = stringutil.ellipsis(desc, ui.termwidth()) |
General Comments 0
You need to be logged in to leave comments.
Login now