Show More
@@ -1098,11 +1098,6 b' coreconfigitem(' | |||
|
1098 | 1098 | ) |
|
1099 | 1099 | coreconfigitem( |
|
1100 | 1100 | b'experimental', |
|
1101 | b'sharesafe-warn-outdated-shares', | |
|
1102 | default=True, | |
|
1103 | ) | |
|
1104 | coreconfigitem( | |
|
1105 | b'experimental', | |
|
1106 | 1101 | b'single-head-per-branch', |
|
1107 | 1102 | default=False, |
|
1108 | 1103 | ) |
@@ -1921,6 +1916,16 b' coreconfigitem(' | |||
|
1921 | 1916 | default=b'abort', |
|
1922 | 1917 | ) |
|
1923 | 1918 | coreconfigitem( |
|
1919 | b'share', | |
|
1920 | b'safe-mismatch.source-not-safe.warn', | |
|
1921 | default=True, | |
|
1922 | ) | |
|
1923 | coreconfigitem( | |
|
1924 | b'share', | |
|
1925 | b'safe-mismatch.source-safe.warn', | |
|
1926 | default=True, | |
|
1927 | ) | |
|
1928 | coreconfigitem( | |
|
1924 | 1929 | b'shelve', |
|
1925 | 1930 | b'maxbackups', |
|
1926 | 1931 | default=10, |
@@ -1965,6 +1965,16 b' Alias definitions for revsets. See :hg:`' | |||
|
1965 | 1965 | source setting |
|
1966 | 1966 | |
|
1967 | 1967 | |
|
1968 | ``safe-mismatch.source-safe.warn`` | |
|
1969 | Shows a warning on operations if the shared repository does not use | |
|
1970 | share-safe, but the source repository does. | |
|
1971 | (default: True) | |
|
1972 | ||
|
1973 | ``safe-mismatch.source-not-safe.warn`` | |
|
1974 | Shows a warning on operations if the shared repository uses share-safe, | |
|
1975 | but the source repository does not. | |
|
1976 | (default: True) | |
|
1977 | ||
|
1968 | 1978 | ``storage`` |
|
1969 | 1979 | ----------- |
|
1970 | 1980 |
@@ -575,6 +575,9 b' def makelocalrepository(baseui, path, in' | |||
|
575 | 575 | and requirementsmod.SHARESAFE_REQUIREMENT |
|
576 | 576 | not in _readrequires(sharedvfs, True) |
|
577 | 577 | ): |
|
578 | mismatch_warn = ui.configbool( | |
|
579 | b'share', b'safe-mismatch.source-not-safe.warn' | |
|
580 | ) | |
|
578 | 581 | mismatch_config = ui.config( |
|
579 | 582 | b'share', b'safe-mismatch.source-not-safe' |
|
580 | 583 | ) |
@@ -592,6 +595,7 b' def makelocalrepository(baseui, path, in' | |||
|
592 | 595 | sharedvfs, |
|
593 | 596 | requirements, |
|
594 | 597 | mismatch_config, |
|
598 | mismatch_warn, | |
|
595 | 599 | ) |
|
596 | 600 | elif mismatch_config == b'abort': |
|
597 | 601 | raise error.Abort( |
@@ -618,6 +622,9 b' def makelocalrepository(baseui, path, in' | |||
|
618 | 622 | sourcerequires = _readrequires(sharedvfs, False) |
|
619 | 623 | if requirementsmod.SHARESAFE_REQUIREMENT in sourcerequires: |
|
620 | 624 | mismatch_config = ui.config(b'share', b'safe-mismatch.source-safe') |
|
625 | mismatch_warn = ui.configbool( | |
|
626 | b'share', b'safe-mismatch.source-safe.warn' | |
|
627 | ) | |
|
621 | 628 | if mismatch_config in ( |
|
622 | 629 | b'upgrade-allow', |
|
623 | 630 | b'allow', |
@@ -632,6 +639,7 b' def makelocalrepository(baseui, path, in' | |||
|
632 | 639 | storevfs, |
|
633 | 640 | requirements, |
|
634 | 641 | mismatch_config, |
|
642 | mismatch_warn, | |
|
635 | 643 | ) |
|
636 | 644 | elif mismatch_config == b'abort': |
|
637 | 645 | raise error.Abort( |
@@ -242,7 +242,12 b' def upgraderepo(' | |||
|
242 | 242 | |
|
243 | 243 | |
|
244 | 244 | def upgrade_share_to_safe( |
|
245 | ui, hgvfs, storevfs, current_requirements, mismatch_config | |
|
245 | ui, | |
|
246 | hgvfs, | |
|
247 | storevfs, | |
|
248 | current_requirements, | |
|
249 | mismatch_config, | |
|
250 | mismatch_warn, | |
|
246 | 251 | ): |
|
247 | 252 | """Upgrades a share to use share-safe mechanism""" |
|
248 | 253 | wlock = None |
@@ -282,7 +287,7 b' def upgrade_share_to_safe(' | |||
|
282 | 287 | _(b'failed to upgrade share, got error: %s') |
|
283 | 288 | % stringutil.forcebytestr(e.strerror) |
|
284 | 289 | ) |
|
285 | elif ui.configbool(b'experimental', b'sharesafe-warn-outdated-shares'): | |
|
290 | elif mismatch_warn: | |
|
286 | 291 | ui.warn( |
|
287 | 292 | _(b'failed to upgrade share, got error: %s\n') |
|
288 | 293 | % stringutil.forcebytestr(e.strerror) |
@@ -298,6 +303,7 b' def downgrade_share_to_non_safe(' | |||
|
298 | 303 | sharedvfs, |
|
299 | 304 | current_requirements, |
|
300 | 305 | mismatch_config, |
|
306 | mismatch_warn, | |
|
301 | 307 | ): |
|
302 | 308 | """Downgrades a share which use share-safe to not use it""" |
|
303 | 309 | wlock = None |
@@ -335,6 +341,11 b' def downgrade_share_to_non_safe(' | |||
|
335 | 341 | _(b'failed to downgrade share, got error: %s') |
|
336 | 342 | % stringutil.forcebytestr(e.strerror) |
|
337 | 343 | ) |
|
344 | elif mismatch_warn: | |
|
345 | ui.warn( | |
|
346 | _(b'failed to downgrade share, got error: %s\n') | |
|
347 | % stringutil.forcebytestr(e.strerror) | |
|
348 | ) | |
|
338 | 349 | finally: |
|
339 | 350 | if wlock: |
|
340 | 351 | wlock.release() |
@@ -546,7 +546,7 b' Check that if lock is taken, upgrade fai' | |||
|
546 | 546 | o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
|
547 | 547 | |
|
548 | 548 | |
|
549 |
$ hg log -GT "{node}: {desc}\n" -R ../nss-share --config share.safe-mismatch.source-safe=upgrade-allow --config |
|
|
549 | $ hg log -GT "{node}: {desc}\n" -R ../nss-share --config share.safe-mismatch.source-safe=upgrade-allow --config share.safe-mismatch.source-safe.warn=False | |
|
550 | 550 | @ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
|
551 | 551 | | |
|
552 | 552 | o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
General Comments 0
You need to be logged in to leave comments.
Login now