[chirp_devel] [PATCH] Allow specification of the hexdump address format
Dan Smith
Fri Jul 18 10:32:13 PDT 2014
> Looks right to me. But I must be missing something, because I get
> ================
> dan[chirp.hg]$ hg import ~/Desktop/dsmith.patch.txt
> applying /Users/dan/Desktop/dsmith.patch.txt
> patching file README.developers
> Hunk #1 FAILED at 18
> Hunk #2 FAILED at 39
> 2 out of 2 hunks FAILED -- saving rejects to file README.developers.rej
> patching file chirp/util.py
> Hunk #1 FAILED at 14
> 1 out of 1 hunks FAILED -- saving rejects to file chirp/util.py.rej
> patching file chirpui/config.py
> Hunk #1 FAILED at 35
> Hunk #2 FAILED at 64
> 2 out of 2 hunks FAILED -- saving rejects to file chirpui/config.py.rej
> patching file chirpui/mainapp.py
> Hunk #1 FAILED at 223
> 1 out of 1 hunks FAILED -- saving rejects to file chirpui/mainapp.py.rej
> abort: patch failed to apply
> ================
This is saying nothing applied, which generally means that line endings
aren't right. I think you're using a mac, which uses \r line endings
(sometimes, not always, and I can never remember when/why). My guess
would be that you copy-and-paste'd the patch out to a file? In that
case, you've got \r endings and the code has \n. Thus, patch (or hg
import in this case) can't find any lines that match.
You could try this:
$ cat dsmith.patch.txt | tr '\r' '\n' > dsmith.patch
$ hg import dsmith.patch
You might also be able to convince TextEdit to convert and save it in
"UNIX Linefeed endings" or something.
If Apple Mail has a way to save out the raw mail without breaking it,
that works too. Things like patch and 'hg import' can process a whole
email and just find the diff inside.
> I'm guessing the patch works for me, but I'd like to test it.
Yep, please do :)
> I can give some feedback on the README file by reading
> the raw patch:
> - It wouldn't be obvious to me that I can have multiple conversion
> specs, so an example of:
> "hexdump_addrfmt = %(addr)03i 0x%(addr)04x
> prints the address in both decimal and hex"
> would be useful.
Surely. Feel free to import this, test it, tweak the README and send it
back adjusted accordingly.
Thanks!
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140718/b61e8152/attachment-0001.bin
More information about the chirp_devel
mailing list