openhatch

Issue754

Title Bug in Training Mission: Using diff and patch
Milestone Priority bug
Waiting On Status resolved
Superseder Nosy List JayJays, andrebras, paulproteus, vu2srk
Assigned To vu2srk Keywords

Created on 2012-07-31.19:24:31 by JayJays, last changed 2012-10-22.17:31:19 by paulproteus.

Messages
msg3460 (view) Author: paulproteus Date: 2012-10-22.17:31:19
This is resolved with https://github.com/openhatch/oh-mainline/pull/79 and 
https://github.com/openhatch/oh-
mainline/commit/d52d973ca763e56f6a07b6ea07ade4b7e71ee854 .

Thanks vu2srk!
msg3452 (view) Author: paulproteus Date: 2012-10-17.23:21:39
Some relevant notes:

* http://stackoverflow.com/questions/60950/is-there-a-better-windows-console-
window describes how to use "Mark" mode to do copy + paste in Windows

* You'll find the relevant code in mysite/missions/diffpatch/*.py

* As discussed on IRC, https://openhatch.org/bugs/issue771 has evidence that copy 
and paste on Windows are relevant to the problem

Cheers!
msg3451 (view) Author: vu2srk Date: 2012-10-17.22:08:20
The reason Windows generated diffs fail is because in Linux machines, there are 
white spaces generated that do not get generated in Windows. For eg: if you take 
the diff generated by JayJays (http://codepad.org/xLXnvAwj) and add a single 
white space on lines 10, 15 and 18, the diff goes through. I'm checking this out 
and should have an update by Friday (10/18/2012)
msg3428 (view) Author: paulproteus Date: 2012-09-25.19:30:03
Interesting, so there are at least two separate problems.

* git-diff doesn't take the "-r" option, so we should probably stop 
recommmending its use. (That's a bug in the templates.)

* http://codepad.org/xLXnvAwj (generated by Windows by JayJays) doesn't 
validate.

The way to fix that is to put it into the test suite, make sure it fails 
validation, and then hack the code until the tests pass.
msg3406 (view) Author: andrebras Date: 2012-09-13.11:03:54
I've experienced the same problem. I think the system is using git-diff instead of diff
and you can confirm the options are different from its man pages.

using "/usr/bin/diff -ru recipes recipes-us" worked for me.

:)
msg3357 (view) Author: punjcoder Date: 2012-08-03.19:26:31
I confirm the presence of bugs on OS X too. While using patch command to create unified patch.
> diff -ur recipes us >./outputt
fatal: invalid diff option/value: -ur

Instead this works.
> diff -u recipes us >./outputt

However when patch containing diff file(http://codr.cc/s/09a6c163/) is uploaded, it returns the 
following error. 

Patch does not modify file "Skillet.txt", which it should modify.
msg3348 (view) Author: JayJays Date: 2012-07-31.19:24:30
Diffing indiviual files

Using git bash on windows vista creates the following solution:
http://codepad.org/xLXnvAwj

Unfortunately, it is not accepted. 

I searched for help on irc and was told, it is a bug. 
Thanks.
History
Date User Action Args
2012-10-22 17:31:19paulproteussetstatus: in-progress -> resolved
messages: + msg3460
2012-10-18 22:53:24vu2srksetmessages: - msg3458
2012-10-18 20:47:33vu2srksetmessages: + msg3458
2012-10-17 23:21:39paulproteussetmessages: + msg3452
2012-10-17 22:08:21vu2srksetmessages: + msg3451
2012-10-17 21:51:48vu2srksetstatus: chatting -> in-progress
2012-10-17 21:50:44vu2srksetassignedto: vu2srk
nosy: + vu2srk
2012-09-25 19:30:04paulproteussetnosy: + andrebras
messages: + msg3428
2012-09-13 11:03:54andrebrassetmessages: + msg3406
2012-08-03 19:26:32punjcodersetstatus: unread -> chatting
messages: + msg3357
2012-07-31 19:25:34JayJayssettitle: Bug in Training Missin: Using diff and patch -> Bug in Training Mission: Using diff and patch
2012-07-31 19:24:31JayJayscreate