Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 22951:6c86c673dde6
obsolete: add createmarkers option
The basic obsolete option is allowing the creation of obsolete markers. This
does not enable other features, such as allowing unstable commits or exchanging
obsolete markers.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 14 Oct 2014 13:23:52 -0700 |
parents | bb8278b289ee |
children | 90f86ad3d4ff |
comparison
equal
deleted
inserted
replaced
22950:bb8278b289ee | 22951:6c86c673dde6 |
---|---|
404 defaultformat = self.ui.configint('format', 'obsstore-version', None) | 404 defaultformat = self.ui.configint('format', 'obsstore-version', None) |
405 # rely on obsstore class default when possible. | 405 # rely on obsstore class default when possible. |
406 kwargs = {} | 406 kwargs = {} |
407 if defaultformat is not None: | 407 if defaultformat is not None: |
408 kwargs['defaultformat'] = defaultformat | 408 kwargs['defaultformat'] = defaultformat |
409 store = obsolete.obsstore(self.sopener, readonly=not obsolete._enabled, | 409 readonly = not obsolete.isenabled(self, obsolete.createmarkersopt) |
410 store = obsolete.obsstore(self.sopener, readonly=readonly, | |
410 **kwargs) | 411 **kwargs) |
411 if store and not obsolete._enabled: | 412 if store and readonly: |
412 # message is rare enough to not be translated | 413 # message is rare enough to not be translated |
413 msg = 'obsolete feature not enabled but %i markers found!\n' | 414 msg = 'obsolete feature not enabled but %i markers found!\n' |
414 self.ui.warn(msg % len(list(store))) | 415 self.ui.warn(msg % len(list(store))) |
415 return store | 416 return store |
416 | 417 |