Show More
@@ -499,14 +499,19 b' def _docreatecmd(ui, repo, pats, opts):' | |||
|
499 | 499 | return 1 |
|
500 | 500 | |
|
501 | 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 | 504 | match = scmutil.matchfiles(repo, repo[node].files()) |
|
504 | 505 | _shelvecreatedcommit(repo, node, name, match) |
|
505 | 506 | |
|
506 | 507 | if ui.formatted(): |
|
507 | 508 | desc = stringutil.ellipsis(desc, ui.termwidth()) |
|
508 | 509 | ui.status(_('shelved as %s\n') % name) |
|
509 | hg.update(repo, parent.node()) | |
|
510 | if opts['keep']: | |
|
511 | with repo.dirstate.parentchange(): | |
|
512 | scmutil.movedirstate(repo, parent, match) | |
|
513 | else: | |
|
514 | hg.update(repo, parent.node()) | |
|
510 | 515 | if origbranch != repo['.'].branch() and not _isbareshelve(pats, opts): |
|
511 | 516 | repo.dirstate.setbranch(origbranch) |
|
512 | 517 |
@@ -928,6 +928,20 b' with general delta' | |||
|
928 | 928 | Stream params: {Compression: BZ} |
|
929 | 929 | changegroup -- {nbchanges: 1, version: 02} (mandatory: True) |
|
930 | 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 | 945 | $ cd .. |
|
932 | 946 | |
|
933 | 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