[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] Need help applying patches



Gaudenz has submitted a few useful patches which I want to commit to the
gpgme branch, but git apply seems to fail. I've forwarded the message
text below, and attached the patches. When I apply it gpgme, I get:


$ git apply --check --verbose ../patches2merge/0001-Unify-formatting-of-GPGME-error-messages.patch
Checking patch lib/sup/crypto.rb...
error: while searching for:
    begin
      sig = GPGME.detach_sign(format_payload(payload), gpg_opts)
    rescue GPGME::Error => exc
      info "Error while running gpg: #{exc.message}"
      raise Error, "GPG command failed. See log for details."
    end

    envelope = RMail::Message.new

error: patch failed: lib/sup/crypto.rb:75
error: lib/sup/crypto.rb: patch does not apply


But I can't see why it could not find it. The code quoted above has
moved down by 31 lines, but is otherwise unchanged, but I thought git
could cope with that :/

I tried hand-editing the patch to change the line numbers, but I still
get the same error. Am I missing a trick? I've checked the file formats
and both have unix-style line endings.

I have tried and I can apply these patches by hand, but then they will
appear as committed by me, rather than giving Gaudenz his due.

Do others have the same problem? You could try by checking out the gpgme
branch and trying git apply.

I've also tried git am on a directory with these 3 attachments in:


$ git am -s ../patches2merge/
Nothing to do.


Not very helpful. Any help appreciated.

Hamish Downer


PS I am using git 1.7.1 on Ubuntu 10.10 x86_64 


--- Begin forwarded message from Gaudenz Steinlin ---
From: Gaudenz Steinlin <gaudenz@soziologie.ch>
To: sup-devel <sup-devel@rubyforge.org>
Date: Thu, 17 Feb 2011 14:49:01 +0000
Subject: [sup-devel] GPGME fixes

Hi

While reimporting all my messages I encountered a few problemes with
the GPGME code. Please consider the attached fixes.

The second patch depends on the first (error message unification). But
if you don't like the first I can easily produce a standalone version.

Gaudenz

--- End forwarded message ---

Attachment: 0003-Check-for-valid-signature-before-signature.to_s.patch
Description: Binary data

Attachment: 0002-Check-for-ArgumentError-on-signature-verification.patch
Description: Binary data

Attachment: 0001-Unify-formatting-of-GPGME-error-messages.patch
Description: Binary data

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel