1. 19 Jul, 2016 3 commits
    • Damien Lespiau's avatar
      patch: Make the /patch/msgid/ view resilient to duplicate msgids · d8a74c39
      Damien Lespiau authored
      
      
      In case of cross posting on mailing-lists handled by patchwork we have
      duplicated msgids in the DB. So we need to make a choice when asked for
      the patch with a give msgid. Otherwise:
      
      Internal Server Error: /patch/msgid/1461691808-12414-20-git-send-email-daniel.vetter@ffwll.ch/
      Traceback (most recent call last):
        File "django/core/handlers/base.py", line 132, in get_response
          response = wrapped_callback(request, *callback_args, **callback_kwargs)
        File "patchwork/views/patch.py", line 128, in msgid
          patch = get_object_or_404(Patch, msgid='<' + msgid + '>')
        File "shortcuts.py", line 155, in get_object_or_404
          return queryset.get(*args, **kwargs)
        File "django/db/models/query.py", line 338, in get
          (self.model._meta.object_name, num)
      MultipleObjectsReturned: get() returned more than one Patch -- it returned 2!
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      d8a74c39
    • Damien Lespiau's avatar
      parsemail: Increase the lock timeout to a minute · aa6522c6
      Damien Lespiau authored
      
      
      We do reach that timeout on production for large series. Give a bit more
      leeway.
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      aa6522c6
    • Damien Lespiau's avatar
      parsemail: Limit the search for previous patches to the current project · d4a8cbb4
      Damien Lespiau authored
      
      
      Patches are sometimes cross posted on mailing-lists handled by the same
      patchwork instance, so msgids aren't unique across projects anymore.
      
      This fixes:
      
      Traceback (most recent call last):
        File "patchwork/bin/parsemail.py", line 883, in main
          return parse_mail(mail)
        File "patchwork/bin/parsemail.py", line 761, in parse_mail
          content = find_content(project, mail)
        File "patchwork/bin/parsemail.py", line 423, in find_content
          ret.patch_order, n, refs)
        File "patchwork/bin/parsemail.py", line 533, in find_series_for_mail
          previous_patch = find_previous_patch(revision, order, refs)
        File "patchwork/bin/parsemail.py", line 468, in find_previous_patch
          patch = Patch.objects.get(msgid=ref)
        File "django/db/models/manager.py", line 127, in manager_method
          return getattr(self.get_queryset(), name)(*args, **kwargs)
        File "django/db/models/query.py", line 338, in get
          (self.model._meta.object_name, num)
      MultipleObjectsReturned: get() returned more than one Patch -- it returned 2!
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      d4a8cbb4
  2. 06 Jul, 2016 2 commits
  3. 02 Jul, 2016 1 commit
  4. 16 May, 2016 3 commits
  5. 05 May, 2016 5 commits
  6. 03 May, 2016 19 commits
  7. 29 Apr, 2016 6 commits
  8. 28 Apr, 2016 1 commit