Show More
@@ -1432,6 +1432,12 b' coreconfigitem(' | |||||
1432 | experimental=True, |
|
1432 | experimental=True, | |
1433 | ) |
|
1433 | ) | |
1434 | coreconfigitem( |
|
1434 | coreconfigitem( | |
|
1435 | b'shelve', | |||
|
1436 | b'store', | |||
|
1437 | default='internal', | |||
|
1438 | experimental=True, | |||
|
1439 | ) | |||
|
1440 | coreconfigitem( | |||
1435 | b'fsmonitor', |
|
1441 | b'fsmonitor', | |
1436 | b'warn_when_unused', |
|
1442 | b'warn_when_unused', | |
1437 | default=True, |
|
1443 | default=True, |
@@ -99,8 +99,15 b' class ShelfDir:' | |||||
99 | return sorted(info, reverse=True) |
|
99 | return sorted(info, reverse=True) | |
100 |
|
100 | |||
101 |
|
101 | |||
|
102 | def _use_internal_phase(repo): | |||
|
103 | return ( | |||
|
104 | phases.supportinternal(repo) | |||
|
105 | and repo.ui.config(b'shelve', b'store') == 'internal' | |||
|
106 | ) | |||
|
107 | ||||
|
108 | ||||
102 | def _target_phase(repo): |
|
109 | def _target_phase(repo): | |
103 |
return phases.internal if |
|
110 | return phases.internal if _use_internal_phase(repo) else phases.secret | |
104 |
|
111 | |||
105 |
|
112 | |||
106 | class Shelf: |
|
113 | class Shelf: | |
@@ -548,7 +555,7 b' def _includeunknownfiles(repo, pats, opt' | |||||
548 |
|
555 | |||
549 |
|
556 | |||
550 | def _finishshelve(repo, tr): |
|
557 | def _finishshelve(repo, tr): | |
551 |
if |
|
558 | if _use_internal_phase(repo): | |
552 | tr.close() |
|
559 | tr.close() | |
553 | else: |
|
560 | else: | |
554 | _aborttransaction(repo, tr) |
|
561 | _aborttransaction(repo, tr) | |
@@ -789,7 +796,7 b' def unshelveabort(ui, repo, state):' | |||||
789 | if state.activebookmark and state.activebookmark in repo._bookmarks: |
|
796 | if state.activebookmark and state.activebookmark in repo._bookmarks: | |
790 | bookmarks.activate(repo, state.activebookmark) |
|
797 | bookmarks.activate(repo, state.activebookmark) | |
791 | mergefiles(ui, repo, state.wctx, state.pendingctx) |
|
798 | mergefiles(ui, repo, state.wctx, state.pendingctx) | |
792 |
if not |
|
799 | if not _use_internal_phase(repo): | |
793 | repair.strip( |
|
800 | repair.strip( | |
794 | ui, repo, state.nodestoremove, backup=False, topic=b'shelve' |
|
801 | ui, repo, state.nodestoremove, backup=False, topic=b'shelve' | |
795 | ) |
|
802 | ) | |
@@ -876,7 +883,7 b' def unshelvecontinue(ui, repo, state, op' | |||||
876 | mergefiles(ui, repo, state.wctx, shelvectx) |
|
883 | mergefiles(ui, repo, state.wctx, shelvectx) | |
877 | restorebranch(ui, repo, state.branchtorestore) |
|
884 | restorebranch(ui, repo, state.branchtorestore) | |
878 |
|
885 | |||
879 |
if not |
|
886 | if not _use_internal_phase(repo): | |
880 | repair.strip( |
|
887 | repair.strip( | |
881 | ui, repo, state.nodestoremove, backup=False, topic=b'shelve' |
|
888 | ui, repo, state.nodestoremove, backup=False, topic=b'shelve' | |
882 | ) |
|
889 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now