Show More
@@ -499,13 +499,18 def _docreatecmd(ui, repo, pats, opts): | |||||
499 | return 1 |
|
499 | return 1 | |
500 |
|
500 | |||
501 | # Create a matcher so that prefetch doesn't attempt to fetch |
|
501 | # Create a matcher so that prefetch doesn't attempt to fetch | |
502 | # the entire repository pointlessly |
|
502 | # the entire repository pointlessly, and as an optimisation | |
|
503 | # for movedirstate, if needed. | |||
503 | match = scmutil.matchfiles(repo, repo[node].files()) |
|
504 | match = scmutil.matchfiles(repo, repo[node].files()) | |
504 | _shelvecreatedcommit(repo, node, name, match) |
|
505 | _shelvecreatedcommit(repo, node, name, match) | |
505 |
|
506 | |||
506 | if ui.formatted(): |
|
507 | if ui.formatted(): | |
507 | desc = stringutil.ellipsis(desc, ui.termwidth()) |
|
508 | desc = stringutil.ellipsis(desc, ui.termwidth()) | |
508 | ui.status(_('shelved as %s\n') % name) |
|
509 | ui.status(_('shelved as %s\n') % name) | |
|
510 | if opts['keep']: | |||
|
511 | with repo.dirstate.parentchange(): | |||
|
512 | scmutil.movedirstate(repo, parent, match) | |||
|
513 | else: | |||
509 | hg.update(repo, parent.node()) |
|
514 | hg.update(repo, parent.node()) | |
510 | if origbranch != repo['.'].branch() and not _isbareshelve(pats, opts): |
|
515 | if origbranch != repo['.'].branch() and not _isbareshelve(pats, opts): | |
511 | repo.dirstate.setbranch(origbranch) |
|
516 | repo.dirstate.setbranch(origbranch) |
@@ -928,6 +928,20 with general delta | |||||
928 | Stream params: {Compression: BZ} |
|
928 | Stream params: {Compression: BZ} | |
929 | changegroup -- {nbchanges: 1, version: 02} (mandatory: True) |
|
929 | changegroup -- {nbchanges: 1, version: 02} (mandatory: True) | |
930 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 |
|
930 | 330882a04d2ce8487636b1fb292e5beea77fa1e3 | |
|
931 | ||||
|
932 | Test shelve --keep | |||
|
933 | ||||
|
934 | $ hg unshelve | |||
|
935 | unshelving change 'default' | |||
|
936 | $ hg shelve --keep | |||
|
937 | shelved as default | |||
|
938 | $ hg diff | |||
|
939 | diff --git a/jungle b/jungle | |||
|
940 | new file mode 100644 | |||
|
941 | --- /dev/null | |||
|
942 | +++ b/jungle | |||
|
943 | @@ -0,0 +1,1 @@ | |||
|
944 | +babar | |||
931 | $ cd .. |
|
945 | $ cd .. | |
932 |
|
946 | |||
933 | Test visibility of in-memory changes inside transaction to external hook |
|
947 | Test visibility of in-memory changes inside transaction to external hook |
General Comments 0
You need to be logged in to leave comments.
Login now