[Svnmerge] Phantom revs support done!

Blair Zajac blair at orcaware.com
Thu Sep 29 10:35:13 PDT 2005


Giovanni Bajo wrote:
> Hello,
> 
> Testing is welcome. Use "svn co svn://pyinstaller.hpcf.upr.edu/svnmerge" to
> get latest version.

Giovanni,

I'm going to be trying this out today.

Couple of things looking at the code:

1) Would mind running

svn ps svn:executable '*' *

2) There's a small patch that fixes a mistyped variable and some spelling mistakes.

3) Running pychecker on the file found some stuff.  Many of these are here 
because of the support for older Python versions, but some of them could 
probably be cleaned up, such as the one on line 513 and 546.  Probably worth 
looking at.

$ pychecker svnmerge.py
Processing svnmerge...

Warnings...

svnmerge.py:58: Statement appears to have no effect
svnmerge.py:60: (False) shadows builtin
svnmerge.py:60: (True) shadows builtin
svnmerge.py:227: Using is None, may not always work
svnmerge.py:399: Using is not None, may not always work
svnmerge.py:451: Using a conditional statement with a constant value (0)
svnmerge.py:513: No global (format_merged_props) found
svnmerge.py:527: Using is None, may not always work
svnmerge.py:546: Parameter (head_url) not used
svnmerge.py:628: Using a conditional statement with a constant value (0)
svnmerge.py:778: Using a conditional statement with a constant value (0)
svnmerge.py:791: Using a conditional statement with a constant value (0)
svnmerge.py:868: Using a conditional statement with a constant value (0)

Thanks,
Blair

-- 
Blair Zajac, Ph.D.
<blair at orcaware.com>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/


--- svnmerge.py (revision 139)
+++ svnmerge.py (working copy)
@@ -50,7 +50,7 @@
      sys.exit(1)

  ###############################################################################
-# Support for older Pyhton versions
+# Support for older Python versions
  ###############################################################################
  # True/False constants are Python 2.2+
@@ -399,7 +399,7 @@
      return re.search(r"^[a-zA-Z][-+\.\w]*://", url) is not None

  def is_wc(dir):
-    """Check if a directory is a repo working copy."""
+    """Check if a directory is a working copy."""
      return os.path.isdir(dir) and os.path.isdir(os.path.join(dir, ".svn"))

  _cache_svninfo = {}
@@ -546,11 +546,11 @@
  def analyze_head_revs(branch_dir, head_url):
      """For the given branch and head, extract the real and phantom
      head revisions."""
-    # Extract the latest repository revison from the URL of the branch
+    # Extract the latest repository revision from the URL of the branch
      # directory (which is already cached at this point).
      head_rev = get_latestrev(target_to_url(branch_dir))

-    # Calculate the base of analisys. If there is a "1-XX" interval in the
+    # Calculate the base of analysis. If there is a "1-XX" interval in the
      # merged_revs, we do not need to check those.
      base = 1
      r = opts["merged_revs"].normalized()
@@ -771,7 +771,7 @@
          elif o == "-l":      opts["avail_display"] = "logs"
          elif o == "-A":      opts["avail_showall"] = True
          elif o == "-v":      opts["verbose"] += 1
-        elif o == "-n":      opts["pretend"] = otps["show_cmds"] = True
+        elif o == "-n":      opts["pretend"] = opts["show_cmds"] = True
          elif o == "-s":      opts["show_cmds"] = True
          elif o == "-V":      opts["commit_verbose"] = True
          elif o == "-S":      head = a



More information about the Svnmerge mailing list