equal
deleted
inserted
replaced
105 else: |
105 else: |
106 touched_revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS) |
106 touched_revlogs = set(upgrade_engine.UPGRADE_ALL_REVLOGS) |
107 for rl, enabled in specified_revlogs.items(): |
107 for rl, enabled in specified_revlogs.items(): |
108 if not enabled: |
108 if not enabled: |
109 touched_revlogs.discard(rl) |
109 touched_revlogs.discard(rl) |
|
110 |
|
111 if repo.shared(): |
|
112 unsafe_actions = set() |
|
113 unsafe_actions.update(up_actions) |
|
114 unsafe_actions.update(removed_actions) |
|
115 unsafe_actions.update(optimizations) |
|
116 unsafe_actions = [ |
|
117 a for a in unsafe_actions if not a.compatible_with_share |
|
118 ] |
|
119 unsafe_actions.sort(key=lambda a: a.name) |
|
120 if unsafe_actions: |
|
121 m = _(b'cannot use these actions on a share repository: %s') |
|
122 h = _(b'upgrade the main repository directly') |
|
123 actions = b', '.join(a.name for a in unsafe_actions) |
|
124 m %= actions |
|
125 raise error.Abort(m, hint=h) |
110 |
126 |
111 for action in sorted(up_actions + removed_actions, key=lambda a: a.name): |
127 for action in sorted(up_actions + removed_actions, key=lambda a: a.name): |
112 # optimisation does not "requires anything, they just needs it. |
128 # optimisation does not "requires anything, they just needs it. |
113 if action.type != upgrade_actions.FORMAT_VARIANT: |
129 if action.type != upgrade_actions.FORMAT_VARIANT: |
114 continue |
130 continue |