--- a/hgext/obsolete.py Wed Aug 15 15:38:55 2012 +0200
+++ b/hgext/obsolete.py Wed Aug 15 16:09:09 2012 +0200
@@ -79,10 +79,10 @@
class exthelper(object):
"""Helper for modular extension setup
- A single helper should be intanciated for each extension. Helper method are
- then used as decorator for various purpose.
+ A single helper should be instanciated for each extension. Helper
+ methods are then used as decorator for various purpose.
- All decorator returns the original function and may be chained.
+ All decorators return the original function and may be chained.
"""
def __init__(self):
@@ -97,7 +97,7 @@
self._duckpunchers = []
def final_uisetup(self, ui):
- """Method to be used as a the extension uisetup
+ """Method to be used as the extension uisetup
The following operations belong here:
@@ -106,11 +106,11 @@
objects created after this, and in particular the ui that will be
passed to runcommand
- Command wraps (extensions.wrapcommand)
- - Changes that need to be visible by other extensions: because
+ - Changes that need to be visible to other extensions: because
initialization occurs in phases (all extensions run uisetup, then all
- run extsetup), a change made here will be visible by other extensions
+ run extsetup), a change made here will be visible to other extensions
during extsetup
- - Monkeypatches or function wraps (extensions.wrapfunction) of dispatch
+ - Monkeypatch or wrap function (extensions.wrapfunction) of dispatch
module members
- Setup of pre-* and post-* hooks
- pushkey setup
@@ -129,9 +129,10 @@
The following operations belong here:
- - Changes depending on the status of other extensions. (if extensions.find('mq'))
+ - Changes depending on the status of other extensions. (if
+ extensions.find('mq'))
- Add a global option to all commands
- - Extend revsets
+ - Register revset functions
"""
knownexts = {}
for name, symbol in self._revsetsymbols:
@@ -241,7 +242,7 @@
If the second option `extension` argument is provided, the wrapping
will be applied in the extension commandtable. This argument must be a
string that will be searched using `extension.find` if not found and
- Abort error is raised. If the wrapping apply to an extension, it is
+ Abort error is raised. If the wrapping applies to an extension, it is
installed during `extsetup`
example::
@@ -263,9 +264,9 @@
def wrapfunction(self, container, funcname):
"""Decorated function is a function wrapper
- This function take two argument, the container and the name of the
+ This function takes two arguments, the container and the name of the
function to wrap. The wrapping is performed during `uisetup`.
- (there is don't support extension)
+ (there is no extension support)
example::
@@ -282,7 +283,7 @@
def addattr(self, container, funcname):
"""Decorated function is to be added to the container
- This function take two argument, the container and the name of the
+ This function takes two arguments, the container and the name of the
function to wrap. The wrapping is performed during `uisetup`.
example::
@@ -339,7 +340,7 @@
@cachefor('obsolete')
def _computeobsoleteset(repo):
- """the set of obsolete revision"""
+ """the set of obsolete revisions"""
obs = set()
nm = repo.changelog.nodemap
for prec in repo.obsstore.precursors:
@@ -350,22 +351,22 @@
@cachefor('unstable')
def _computeunstableset(repo):
- """the set of non obsolete revision with obsolete parent"""
+ """the set of non obsolete revisions with obsolete parents"""
return set(repo.revs('(obsolete()::) - obsolete()'))
@cachefor('suspended')
def _computesuspendedset(repo):
- """the set of obsolete parent with non obsolete descendant"""
+ """the set of obsolete parents with non obsolete descendants"""
return set(repo.revs('obsolete() and obsolete()::unstable()'))
@cachefor('extinct')
def _computeextinctset(repo):
- """the set of obsolete parent without non obsolete descendant"""
+ """the set of obsolete parents without non obsolete descendants"""
return set(repo.revs('obsolete() - obsolete()::unstable()'))
@eh.wrapfunction(obsolete.obsstore, '__init__')
def _initobsstorecache(orig, obsstore, *args, **kwargs):
- """add a caches attributes to obsstore"""
+ """add a cache attribute to obsstore"""
obsstore.caches = {}
return orig(obsstore, *args, **kwargs)