Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 23558:3198aac7a95d
namespaces: add bookmarks to the names data structure
This marks the first use of abstracting our different types of named objects
(bookmarks, tags, branches, etc.) and upcoming patches will use this to
simplify logic.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 14 Dec 2014 12:53:50 -0800 |
parents | deabbe7ed54b |
children | 3c2419e07df5 |
comparison
equal
deleted
inserted
replaced
23557:b04b27aa6da3 | 23558:3198aac7a95d |
---|---|
16 import merge as mergemod | 16 import merge as mergemod |
17 import tags as tagsmod | 17 import tags as tagsmod |
18 from lock import release | 18 from lock import release |
19 import weakref, errno, os, time, inspect | 19 import weakref, errno, os, time, inspect |
20 import branchmap, pathutil | 20 import branchmap, pathutil |
21 import namespaces | |
21 propertycache = util.propertycache | 22 propertycache = util.propertycache |
22 filecache = scmutil.filecache | 23 filecache = scmutil.filecache |
23 | 24 |
24 class repofilecache(filecache): | 25 class repofilecache(filecache): |
25 """All filecache usage on repo are done for logic that should be unfiltered | 26 """All filecache usage on repo are done for logic that should be unfiltered |
295 # - new obsolescence marker, | 296 # - new obsolescence marker, |
296 # - working directory parent change, | 297 # - working directory parent change, |
297 # - bookmark changes | 298 # - bookmark changes |
298 self.filteredrevcache = {} | 299 self.filteredrevcache = {} |
299 | 300 |
301 # generic mapping between names and nodes | |
302 self.names = namespaces.namespaces(self) | |
303 | |
300 def close(self): | 304 def close(self): |
301 pass | 305 pass |
302 | 306 |
303 def _restrictcapabilities(self, caps): | 307 def _restrictcapabilities(self, caps): |
304 # bundle2 is not ready for prime time, drop it unless explicitly | 308 # bundle2 is not ready for prime time, drop it unless explicitly |