Repository: buildbot/buildbot

Issue:
Implement missing worker email in the email reporter
This is done via creating a custom event message
which the mail reporter can listen to
note that an irc reporter could also listen to the message and alert accordingly



Discussion:

Resolving patch:
diff --git a/master/buildbot/steps/source/svn.py b/master/buildbot/steps/source/svn.py
--- a/master/buildbot/steps/source/svn.py
+++ b/master/buildbot/steps/source/svn.py
@@ -187,6 +187,12 @@ def copy(self):
             export_cmd = ['svn', 'export']
             if self.revision:
                 export_cmd.extend(["--revision", str(self.revision)])
+            if self.username:
+                export_cmd.extend(['--username', self.username])
+            if self.password:
+                export_cmd.extend(['--password', self.password])
+            if self.extra_args:
+                export_cmd.extend(self.extra_args)
             export_cmd.extend(['source', self.workdir])
 
             cmd = buildstep.RemoteShellCommand('', export_cmd,


Test patch:
diff --git a/master/buildbot/test/unit/test_steps_source_svn.py b/master/buildbot/test/unit/test_steps_source_svn.py
--- a/master/buildbot/test/unit/test_steps_source_svn.py
+++ b/master/buildbot/test/unit/test_steps_source_svn.py
@@ -1340,6 +1340,54 @@ def test_mode_full_export_given_revision(self):
         self.expectProperty('got_revision', '100', 'SVN')
         return self.runStep()
 
+    def test_mode_full_export_auth(self):
+        self.setupStep(
+                svn.SVN(repourl='http://svn.local/app/trunk',
+                        mode='full', method='export', username='svn_username',
+                        password='svn_password'))
+        self.expectCommands(
+            ExpectShell(workdir='wkdir',
+                        command=['svn', '--version'])
+            + 0,
+            Expect('stat', dict(file='wkdir/.buildbot-patched',
+                                logEnviron=True))
+            + 1,
+            Expect('rmdir', dict(dir='wkdir',
+                                 logEnviron=True))
+            + 0,
+            Expect('stat', dict(file='source/.svn',
+                                logEnviron=True))
+            + 0,
+            ExpectShell(workdir='source',
+                        command=['svn', 'info', '--xml',
+                                 '--non-interactive',
+                                 '--no-auth-cache',
+                                 '--username', 'svn_username',
+                                 '--password', 'svn_password'])
+            + ExpectShell.log('stdio',
+                stdout="""<?xml version="1.0"?><url>http://svn.local/app/trunk</url>""")
+            + 0,
+            ExpectShell(workdir='source',
+                        command=['svn', 'update', '--non-interactive',
+                                 '--no-auth-cache',
+                                 '--username', 'svn_username',
+                                 '--password', 'svn_password'])
+            + 0,
+            ExpectShell(workdir='',
+                        command=['svn', 'export',
+                                 '--username', 'svn_username',
+                                 '--password', 'svn_password', 'source', 'wkdir'])
+            + 0,
+            ExpectShell(workdir='source',
+                        command=['svn', 'info', '--xml'])
+            + ExpectShell.log('stdio',
+                stdout=self.svn_info_stdout_xml)
+            + 0,
+        )
+        self.expectOutcome(result=SUCCESS, status_text=["update"])
+        self.expectProperty('got_revision', '100', 'SVN')
+        return self.runStep()
+
     def test_mode_incremental_with_env(self):
         self.setupStep(
                 svn.SVN(repourl='http://svn.local/app/trunk',