contrib/synthrepo.py
changeset 45942 89a2afe31e82
parent 43104 74802979dd9d
child 48116 5ced12cfa41b
--- a/contrib/synthrepo.py	Fri Nov 27 17:00:00 2020 -0500
+++ b/contrib/synthrepo.py	Fri Nov 27 17:03:29 2020 -0500
@@ -122,7 +122,7 @@
     optionalrepo=True,
 )
 def analyze(ui, repo, *revs, **opts):
-    '''create a simple model of a repository to use for later synthesis
+    """create a simple model of a repository to use for later synthesis
 
     This command examines every changeset in the given range (or all
     of history if none are specified) and creates a simple statistical
@@ -133,7 +133,7 @@
     :hg:`synthesize` to create or augment a repository with synthetic
     commits that have a structure that is statistically similar to the
     analyzed repository.
-    '''
+    """
     root = repo.root
     if not root.endswith(os.path.sep):
         root += os.path.sep
@@ -281,7 +281,7 @@
     _('hg synthesize [OPTION].. DESCFILE'),
 )
 def synthesize(ui, repo, descpath, **opts):
-    '''synthesize commits based on a model of an existing repository
+    """synthesize commits based on a model of an existing repository
 
     The model must have been generated by :hg:`analyze`. Commits will
     be generated randomly according to the probabilities described in
@@ -293,7 +293,7 @@
     names, words will be chosen randomly from a dictionary that is
     presumed to contain one word per line. Use --dict to specify the
     path to an alternate dictionary to use.
-    '''
+    """
     try:
         fp = hg.openpath(ui, descpath)
     except Exception as err:
@@ -542,12 +542,12 @@
     replacements = {'': ''}
 
     def rename(dirpath):
-        '''Recursively rename the directory and all path prefixes.
+        """Recursively rename the directory and all path prefixes.
 
         The mapping from path to renamed path is stored for all path prefixes
         as in dynamic programming, ensuring linear runtime and consistent
         renaming regardless of iteration order through the model.
-        '''
+        """
         if dirpath in replacements:
             return replacements[dirpath]
         head, _ = os.path.split(dirpath)