Show More
@@ -210,6 +210,15 b' class Shelf:' | |||
|
210 | 210 | self.vfs.tryunlink(self.name + b'.' + ext) |
|
211 | 211 | |
|
212 | 212 | |
|
213 | def _optimized_match(repo, node): | |
|
214 | """ | |
|
215 | Create a matcher so that prefetch doesn't attempt to fetch | |
|
216 | the entire repository pointlessly, and as an optimisation | |
|
217 | for movedirstate, if needed. | |
|
218 | """ | |
|
219 | return scmutil.matchfiles(repo, repo[node].files()) | |
|
220 | ||
|
221 | ||
|
213 | 222 | class shelvedstate: |
|
214 | 223 | """Handle persistence during unshelving operations. |
|
215 | 224 | |
@@ -579,10 +588,7 b' def _docreatecmd(ui, repo, pats, opts):' | |||
|
579 | 588 | _nothingtoshelvemessaging(ui, repo, pats, opts) |
|
580 | 589 | return 1 |
|
581 | 590 | |
|
582 | # Create a matcher so that prefetch doesn't attempt to fetch | |
|
583 | # the entire repository pointlessly, and as an optimisation | |
|
584 | # for movedirstate, if needed. | |
|
585 | match = scmutil.matchfiles(repo, repo[node].files()) | |
|
591 | match = _optimized_match(repo, node) | |
|
586 | 592 | _shelvecreatedcommit(repo, node, name, match) |
|
587 | 593 | |
|
588 | 594 | ui.status(_(b'shelved as %s\n') % name) |
@@ -957,7 +963,7 b' def _createunshelvectx(ui, repo, shelvec' | |||
|
957 | 963 | user=shelvectx.user(), |
|
958 | 964 | ) |
|
959 | 965 | if snode: |
|
960 |
m = |
|
|
966 | m = _optimized_match(repo, snode) | |
|
961 | 967 | _shelvecreatedcommit(repo, snode, basename, m) |
|
962 | 968 | |
|
963 | 969 | return newnode, bool(snode) |
General Comments 0
You need to be logged in to leave comments.
Login now