diff hgext/evolve.py @ 517:0bc0c9edcb15 stable

evolve: usual syntax/grammar errors/long lines cleanup
author Patrick Mezard <patrick@mezard.eu>
date Sat, 25 Aug 2012 09:45:03 +0200
parents 18854dbc92e7
children 9825c7da5b54
line wrap: on
line diff
--- a/hgext/evolve.py	Sat Aug 25 09:32:05 2012 +0200
+++ b/hgext/evolve.py	Sat Aug 25 09:45:03 2012 +0200
@@ -298,12 +298,12 @@
 # Obsolescence related logic can be very slow if we don't have efficient cache.
 #
 # This section implements a cache mechanism that did not make it into core for
-# time reason. It store meaningful set of revision related to obsolescence
-# (obsolete, unstabletble ...
+# time reason. It stores meaningful set of revisions related to obsolescence
+# (obsolete, unstable, etc.)
 #
 # Here is:
 #
-# - Computation of meaningful set,
+# - Computation of meaningful sets
 # - Cache access logic,
 # - Cache invalidation logic,
 # - revset and ctx using this cache.
@@ -565,7 +565,7 @@
     return orig(repo, remote, outgoing, *args, **kwargs)
 
 #####################################################################
-### Filter extinct changeset from common operation                ###
+### Filter extinct changesets from common operations              ###
 #####################################################################
 
 @eh.wrapfunction(merge, 'update')
@@ -1384,7 +1384,7 @@
     # search of a parent which is not killed
     while newer == [()]:
         ui.debug("stabilize target %s is plain dead,"
-                 " trying to stabilize on it's parent")
+                 " trying to stabilize on its parent")
         obs = obs.parents()[0]
         newer = newerversion(repo, obs.node())
     if len(newer) > 1:
@@ -1532,7 +1532,7 @@
     if len(other.parents()) > 1:
         raise util.Abort("conflicting changeset can't be a merge (yet)")
     if other.p1() not in conflicting.parents():
-        raise util.Abort("parent are not common (not handled yet)")
+        raise util.Abort("parents are not common (not handled yet)")
 
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
     ui.status(_('merge:'))
@@ -1547,13 +1547,13 @@
     if dryrun:
         ui.write('hg update -c %s &&\n' % conflicting)
         ui.write('hg merge %s && \n' % other)
-        ui.write('hg commit -m "auto merge resolving conflict between %s and %s"&&\n'
-                  % (conflicting, other))
+        ui.write('hg commit -m "auto merge resolving conflict between '
+                 '%s and %s"&&\n' % (conflicting, other))
         ui.write('hg up -C %s &&\n' % base)
         ui.write('hg revert --all --rev tip &&\n')
-        ui.write('hg commit -m "`hg log -r %s --template={desc}`";\n' % conflicting)
+        ui.write('hg commit -m "`hg log -r %s --template={desc}`";\n'
+                 % conflicting)
         return
-    #oldphase = max(conflicting.phase(), other.phase())
     wlock = lock = None
     try:
         wlock = repo.wlock()
@@ -1573,10 +1573,9 @@
         if stats[3]:
             repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
                              "or 'hg update -C .' to abandon\n"))
-        #repo.dirstate.write()
         if stats[3] > 0:
             raise util.Abort('GASP! Merge Conflict! You are on you own chap!',
-                             hint='/!\\ hg evolve --continue will NOT work /!\\')
+                hint='/!\\ hg evolve --continue will NOT work /!\\')
         tr = repo.transaction('stabilize-conflicting')
         try:
             repo.dirstate.setparents(conflicting.node(), node.nullid)
@@ -1979,8 +1978,9 @@
     _('[-r] revs'))
 def touch(ui, repo, *revs, **opts):
     """Create successors with exact same property but hash
-    
-    This is used to "resurect" changeset"""
+
+    This is used to "resurrect" changesets
+    """
     revs = list(revs)
     revs.extend(opts['rev'])
     if not revs:
@@ -2015,11 +2015,11 @@
         lockmod.release(lock, wlock)
 
 @command('^fold',
-    [('r', 'rev', [], 'revision to fold'),],
+    [('r', 'rev', [], 'revisions to fold'),],
     # allow to choose the seed ?
     _('[-r] revs'))
 def fold(ui, repo, *revs, **opts):
-    """Fold multiple revision into a single one"""
+    """Fold multiple revisions into a single one"""
     revs = list(revs)
     revs.extend(opts['rev'])
     if not revs:
@@ -2030,13 +2030,13 @@
         return 1
     roots = repo.revs('roots(%ld)', revs)
     if len(roots) > 1:
-        raise util.Abort("set have multiple roots")
+        raise util.Abort("set has multiple roots")
     root = repo[roots[0]]
     if root.phase() <= phases.public:
-        raise util.Abort("can't touch public revision")
+        raise util.Abort("can't fold public revisions")
     heads = repo.revs('heads(%ld)', revs)
     if len(heads) > 1:
-        raise util.Abort("set have multiple heads")
+        raise util.Abort("set has multiple heads")
     head = repo[heads[0]]
     wlock = lock = None
     try: