comparison mercurial/bookmarks.py @ 48599:dfbfa802876b

requirements: move "bookmark in store" requirements in the right module There seems to be no reasons to not have it with the others. Differential Revision: https://phab.mercurial-scm.org/D12030
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 17 Jan 2022 19:18:20 +0100
parents b56858d85a7b
children 21ac6aedd5e5
comparison
equal deleted inserted replaced
48598:a6f16ec07ed7 48599:dfbfa802876b
20 from . import ( 20 from . import (
21 encoding, 21 encoding,
22 error, 22 error,
23 obsutil, 23 obsutil,
24 pycompat, 24 pycompat,
25 requirements,
25 scmutil, 26 scmutil,
26 txnutil, 27 txnutil,
27 util, 28 util,
28 ) 29 )
29 from .utils import ( 30 from .utils import (
34 # until 3.5, bookmarks.current was the advertised name, not 35 # until 3.5, bookmarks.current was the advertised name, not
35 # bookmarks.active, so we must use both to avoid breaking old 36 # bookmarks.active, so we must use both to avoid breaking old
36 # custom styles 37 # custom styles
37 activebookmarklabel = b'bookmarks.active bookmarks.current' 38 activebookmarklabel = b'bookmarks.active bookmarks.current'
38 39
39 BOOKMARKS_IN_STORE_REQUIREMENT = b'bookmarksinstore'
40
41 40
42 def bookmarksinstore(repo): 41 def bookmarksinstore(repo):
43 return BOOKMARKS_IN_STORE_REQUIREMENT in repo.requirements 42 return requirements.BOOKMARKS_IN_STORE_REQUIREMENT in repo.requirements
44 43
45 44
46 def bookmarksvfs(repo): 45 def bookmarksvfs(repo):
47 return repo.svfs if bookmarksinstore(repo) else repo.vfs 46 return repo.svfs if bookmarksinstore(repo) else repo.vfs
48 47