← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~cjwatson/launchpad/codeimport-git-model into lp:launchpad

 


Diff comments:

> 
> === modified file 'lib/lp/code/mail/codeimport.py'
> --- lib/lp/code/mail/codeimport.py	2016-10-03 17:03:12 +0000
> +++ lib/lp/code/mail/codeimport.py	2016-10-03 17:03:17 +0000
> @@ -61,7 +61,7 @@
>          user.displayname, user.preferredemail.email)
>  
>      vcs_imports = getUtility(ILaunchpadCelebrities).vcs_imports
> -    headers = {'X-Launchpad-Branch': code_import.branch.unique_name,
> +    headers = {'X-Launchpad-Branch': code_import.target.unique_name,

Yeah.  OTOH it's also consistent (for better or worse) with other existing git-related notifications, so I'm inclined to leave it as it is.

>                 'X-Launchpad-Message-Rationale':
>                     'Operator @%s' % vcs_imports.name,
>                 'X-Launchpad-Message-For': vcs_imports.name,
> 
> === modified file 'lib/lp/code/model/codeimportjob.py'
> --- lib/lp/code/model/codeimportjob.py	2015-07-08 16:05:11 +0000
> +++ lib/lp/code/model/codeimportjob.py	2016-10-03 17:03:17 +0000
> @@ -311,7 +311,8 @@
>              naked_import.date_last_successful = result.date_created
>          # If the status was successful and revisions were imported, arrange
>          # for the branch to be mirrored.
> -        if status == CodeImportResultStatus.SUCCESS:
> +        if (status == CodeImportResultStatus.SUCCESS and
> +                code_import.branch is not None):
>              code_import.branch.requestMirror()

If need be we can have the ref scan job suspend itself if there's an import in progress and have the import job poke things at the end; but I'd rather avoid the extra complexity and latency until we know it's needed.

>          getUtility(ICodeImportEventSet).newFinish(
>              code_import, machine)


-- 
https://code.launchpad.net/~cjwatson/launchpad/codeimport-git-model/+merge/307466
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References