You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/01/26 16:02:51 UTC

svn commit: r1561501 - /manifoldcf/release-scripts/create_site_branch.py

Author: kwright
Date: Sun Jan 26 15:02:51 2014
New Revision: 1561501

URL: http://svn.apache.org/r1561501
Log:
More debugging

Modified:
    manifoldcf/release-scripts/create_site_branch.py

Modified: manifoldcf/release-scripts/create_site_branch.py
URL: http://svn.apache.org/viewvc/manifoldcf/release-scripts/create_site_branch.py?rev=1561501&r1=1561500&r2=1561501&view=diff
==============================================================================
--- manifoldcf/release-scripts/create_site_branch.py (original)
+++ manifoldcf/release-scripts/create_site_branch.py Sun Jan 26 15:02:51 2014
@@ -30,7 +30,7 @@ def match_change_txt_dev_line(line):
     return end_index != -1
 
 def make_change_txt_release_line(build_version):
-    return "======================= Release %s =====================\n" % build_version
+    return "======================= Release %s =====================\r\n" % build_version
 
 def add_change_file_release_row(change_file_path, release_version):
     """ Convert the -dev row in a change file to a release row """
@@ -63,7 +63,7 @@ def match_change_txt_add_line(line):
     return line.find("===") >= 0
 
 def make_change_txt_dev_line(dev_version):
-    return "======================= %s-dev =====================\n" % dev_version;
+    return "======================= %s-dev =====================\r\n" % dev_version;
 
 def add_change_file_new_dev_row(change_file_path, dev_version):
     """ Add a new -dev row to the start of a change file """
@@ -79,8 +79,8 @@ def add_change_file_new_dev_row(change_f
                 else:
                     if match_change_txt_add_line(line):
                         out_fd.write(make_change_txt_dev_line(dev_version))
-                        out_fd.write("\n")
-                        out_fd.write("\n")
+                        out_fd.write("\r\n")
+                        out_fd.write("\r\n")
                         added_row = True
                     else:
                         out_fd.write(line)
@@ -132,12 +132,14 @@ class TagScanner:
         elif self.state == IN_PREAMBLE:
             if uchar == u'?':
                 self.state = IN_PREAMBLE_SEEN_QUESTION
+                self.action_object.write(uchar)
             else:
                 self.action_object.write(uchar)
                 
         elif self.state == IN_COMMENT:
             if uchar == u'-':
                 self.state = IN_COMMENT_SEEN_DASH
+                self.action_object.write(uchar)
             else:
                 self.action_object.write(uchar)
                 
@@ -362,6 +364,7 @@ def fix_pom_xml(pom_file_path, pom_versi
         Fix primary versions in a pom file to become the specified pom_version.
         Returns an array of child project names (NOT paths).
     """
+    rval = None
     temp_file = "%s.tmp" % pom_file_path
     fd = codecs.open(pom_file_path, "r", "utf-8")
     try:
@@ -373,15 +376,15 @@ def fix_pom_xml(pom_file_path, pom_versi
                 for char in line:
                     ts.accept_character(char)
             ts.end()
-            return action_object.modules
+            rval = action_object.modules
         finally:
             out_fd.close()
     finally:
         fd.close()
 
-    # Remove old file and rename temp file
     os.unlink(pom_file_path)
     os.rename(temp_file, pom_file_path)
+    return rval
 
 def update_poms(root_directory, pom_version, root_parent=True):
     """ Update all poms in a project """
@@ -400,7 +403,7 @@ def convert_build_xml_line(line, build_v
     end_index = line.find("\"", index + len(string_to_match))
     if end_index == -1:
         raise Exception("Can't substitute line '%s'" % line)
-    return line[0:index] + build_version + line[end_index:len(line)]
+    return line[0:index] + string_to_match + build_version + line[end_index:len(line)]
 
 def fix_build_xml(build_file_path, build_version):
     """ Update version number in build.xml to be the specified one. """