community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1837973 - in /comdev/reporter.apache.org/branches/TEST_INSTALL/scripts: scandist.py scandist_test.py
Date Mon, 13 Aug 2018 17:37:22 GMT
Author: sebb
Date: Mon Aug 13 17:37:21 2018
New Revision: 1837973

URL: http://svn.apache.org/viewvc?rev=1837973&view=rev
Log:
Sync from trunk

Modified:
    comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist.py
    comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py

Modified: comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist.py?rev=1837973&r1=1837972&r2=1837973&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist.py (original)
+++ comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist.py Mon Aug 13 17:37:21
2018
@@ -236,22 +236,25 @@ def processCommit(commit):
         # Is it a dist/release commit?
         match = re.match(RELEASE_MATCH, path)
         if match:
+            if paths[path]['flags'] == 'D  ':
+                if debug:
+                    print("Ignoring deletion of path '%s' " % path)
+                continue  # it's a deletion; ignore        
             project = match.group(1) 
+            # 
             if project in IGNORED_PROJECTS:
                 if debug:
-                    print("Ignoring commit for path: %s" % path)
+                    print("Ignoring commit for path: %s (%s)" % (path, project))
             else:
                 match = re.match(".*/(.+)$", path)
                 if match:
-                    if paths[path]['flags'] == 'D  ':
-                        if debug:
-                            print("Ignoring deletion of path '%s' " % path)
-                        continue  # it's a deletion; ignore        
                     fileName = match.group(1)
                     if isIgnored(fileName):
                         if debug:
                             print("Ignoring update of file %s" % path)
                         continue
+                if debug:
+                    print("Processing update of file %s" % path)
                 # a single commit can potentially affect multiple projects
                 # create the dict and array if necessary
                 if not project in targets:
@@ -419,7 +422,10 @@ and add your release data (version and d
 
 If you are not a PMC member, please have a PMC member add this information.
 
-While this is not a requirement, we ask that you still add this data to the
+NOTE:
+This task is entirely optional and your release does NOT depend on it.
+
+While not a requirement, we kindly ask that you still add this data to the
 reporter database, so that people using the Apache Reporter Service will be
 able to see the latest release data for this project.
 
@@ -456,6 +462,7 @@ class MyDaemon(daemon):
         main()
  
 if __name__ == "__main__":
+        PID_FILE = '/tmp/scandist.pid'
         logger = logging.getLogger('scandist')
         logger.setLevel(logging.INFO)
         formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s')
@@ -464,14 +471,16 @@ if __name__ == "__main__":
         logger.addHandler(ch)
         logfile = os.environ.get('LOGFILE')
         logger.info("LOGFILE=%s", logfile)
-        daemon = MyDaemon('/tmp/scandist.pid', logfile)
         if len(sys.argv) >= 2:
                 if 'start' == sys.argv[1]:
-                    daemon.start()
+                    my_daemon = MyDaemon(PID_FILE, logfile)
+                    my_daemon.start()
                 elif 'stop' == sys.argv[1]:
-                    daemon.stop()
+                    my_daemon = MyDaemon(PID_FILE, logfile)
+                    my_daemon.stop()
                 elif 'restart' == sys.argv[1]:
-                    daemon.restart()
+                    my_daemon = MyDaemon(PID_FILE, logfile)
+                    my_daemon.restart()
                 elif 'foreground' == sys.argv[1]:
                     debug = True
                     interactive = True
@@ -481,7 +490,7 @@ if __name__ == "__main__":
                     sendEmail = False
                     trace = True
                     interactive = True
-                    if len(sys.argv) > 2:
+                    if len(sys.argv) > 2 and len(sys.argv[2]) > 0: # only override
if non-empty
                         DEFAULT_URL = sys.argv[2]
                     if len(sys.argv) > 3:
                         RELEASE_MATCH = sys.argv[3]

Modified: comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py?rev=1837973&r1=1837972&r2=1837973&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py (original)
+++ comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py Mon Aug 13 17:37:21
2018
@@ -20,12 +20,12 @@ import datetime
 def processBatch():
     for project in scandist.targets:
         # show what is to be processed
-        print("Batch: <<",project, end="")
+        print("Batch: <<",project, end="~")
         committers = scandist.targets[project]
         for committer in committers:
-            print(committer, end="")
+            print(committer, end="~")
             for entry in committers[committer]:
-                print(entry['id'], end="")
+                print(entry['id'], end="~")
         print(">>")
     scandist.processTargets()
     



Mime
View raw message