D2680: [PoC] obsolete: make markers database writable if local-only mode enabled

2020-01-24 Thread baymax (Baymax, Your Personal Patch-care Companion)
This revision now requires changes to proceed.
baymax added a comment.
baymax requested changes to this revision.


  There seems to have been no activities on this Diff for the past 3 Months.
  
  By policy, we are automatically moving it out of the `need-review` state.
  
  Please, move it back to `need-review` without hesitation if this diff should 
still be discussed.
  
  :baymax:need-review-idle:

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D2680/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D2680

To: indygreg, #hg-reviewers, baymax
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2680: [PoC] obsolete: make markers database writable if local-only mode enabled

2018-03-04 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2680

AFFECTED FILES
  mercurial/obsolete.py

CHANGE DETAILS

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -783,7 +783,9 @@
 kwargs = {}
 if defaultformat is not None:
 kwargs[r'defaultformat'] = defaultformat
-readonly = not isenabled(repo, createmarkersopt)
+
+obsopts = getoptions(repo)
+readonly = not obsopts[createmarkersopt] and not obsopts[localonlymodeopt]
 store = obsstore(repo.svfs, readonly=readonly, **kwargs)
 if store and readonly:
 ui.warn(_('obsolete feature not enabled but %i markers found!\n')



To: indygreg, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel