[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] [cvs2svn] Fix various comments and docstrings

From: Max Bowsher <maxb_at_ukf.net>
Date: 2003-08-14 10:48:24 CEST

Superseding my previous patch:

Fix various comments and docstrings

* tools/cvs2svn/cvs2svn.py
  (CollectData.get_branch_name,make_path): Fix factual errors in docstrings.
  (SymbolicNameTracker.enroot_names, SymbolicNameTracker.close_names):
    Make comment describe what check actually does.
  (SymbolicNameTracker score_revisions): Fix docstring typo.
  (pass4): Make comment describe actual use of "count" variable.

Index: cvs2svn.py
===================================================================
--- cvs2svn.py (revision 6732)
+++ cvs2svn.py (working copy)
@@ -108,9 +107,9 @@
     self.branch_names[revision] = name

   def get_branch_name(self, revision):
- """Return the name of the branch whose branch number is REVISION.
- REVISION is an RCS branch number with an odd number of components,
- for example '1.7.2' (never '1.7.0.2')."""
+ """Return the name of the branch on which REVISION lies.
+ REVISION is a non-branch revision number with an even number of
+ components, for example '1.7' (never '1.7.2' nor '1.7.0.2')."""
     brev = revision[:revision.rindex(".")]
     if not self.branch_names.has_key(brev):
       return None
@@ -258,8 +257,8 @@

 def make_path(ctx, path, branch_name = None, tag_name = None):
   """Return the trunk path, branch path, or tag path for PATH.
- CTX holds the name of the branches or tags directory, which is found
- under PATH's first component.
+ CTX holds the name of the branches, tags or trunk directory, which is
+ placed at the beginning of PATH.

   If PATH is empty or None, return the root trunk|branch|tag path.

@@ -1340,8 +1316,10 @@
     self.tags_opening_revs_key or self.br_opening_revs_key, to
     indicate whether NAMES contains tag names or branch names.
     SVN_PATH does not start with '/'."""
+
+ # Guard against names == None
     if not names:
- return # early out
+ return

     for name in names:
       components = [name] + string.split(svn_path, '/')
@@ -1381,8 +1359,10 @@
     CLOSING_KEY is self.tags_closing_revs_key or
     self.br_closing_revs_key, to indicate whether NAMES are tags or
     branches. SVN_PATH does not start with '/'."""
+
+ # Guard against names == None
     if not names:
- return # early out
+ return

     for name in names:
       components = [name] + string.split(svn_path, '/')
@@ -1423,7 +1401,7 @@

     where REV2 > REV1 and all scores are > 0. OPENINGS and CLOSINGS
     are the values of self.tags_opening_revs_key and
- self.tags_closing_revs_key, or self.br_tags_opening_revs_key and
+ self.tags_closing_revs_key, or self.br_opening_revs_key and
     self.br_closing_revs_key, from some file or directory node, or
     else None.

@@ -2032,9 +2010,8 @@
   # it's quite easy to have interleaved commits.
   commits = { }

- # The number of separate commits processed in a given flush. This
- # is used only for printing statistics, it does not affect the
- # results in the repository.
+ # The total number of separate commits processed. This is used only for
+ # printing statistics, it does not affect the results in the repository.
   count = 0

   # Start the dumpfile object.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 22 04:29:34 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.