Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1
  • 2

TOPIC:

v3: Issue: Management buttons overlapping 9 years 3 months ago #3009

  • jayaich
  • jayaich's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 82
  • Thank you received: 5
It seems that tortoisegit is a Windows interface to git, so I have no idea about that really (I don't use windows). The patch I provided is a unified diff patch, and it seems that to apply this you have to use tortoisemerge. Not sure if that helps at all.

Personally I do everything from the command line. With git I just apply the patch directly to a local clone, commit the change, and then push that up to the git master branch (or whatever branch depending on the project).

Please Inloggen or Create an account to join the conversation.

v3: Issue: Management buttons overlapping 9 years 3 months ago #3010

  • jayaich
  • jayaich's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 82
  • Thank you received: 5
Also section 2.31.3 of this link may be useful. The management.php file is at the top-level of the repository (which is why the patch shows it just as a filename rather than a pathname).

Please Inloggen or Create an account to join the conversation.

v3: Issue: Management buttons overlapping 9 years 3 months ago #3013

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
If I try and do that I get an error message 'The patch does not apply cleanly to C:\blah and no version information is given. Patching is not possible.'

Please Inloggen or Create an account to join the conversation.

v3: Issue: Management buttons overlapping 9 years 3 months ago #3015

  • jayaich
  • jayaich's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 82
  • Thank you received: 5
The only thing I can suggest then is applying the patch by hand. It should be easy enough. For unified diffs the first couple of lines beginning '---' and '+++' show the files being compared. The lines beginning '@@' indicate the (approx) line number of where the patch should be applied. Diffs usually provide 3 lines of code before the patch and 3 lines after so as to provide some context. As for the patch itself, lines beginning with a space are untouched. Lines beginning with a '-' are to be deleted from the code, and lines beginning with a '+' are to be inserted into the code.

So looking at the unified diff, it starts with line 238 to be removed (if line 235 is the '?>' line, then line 238 is the line to be deleted. 235 + 3 context lines = 238). The second part, indicates that line 246 is to be removed, and finally a line is to be inserted after line 306.

As said the line numbers are approx because if you remove a line then the original line numbering is now out by one. This is where the second set of numbers on the '@@' lines comes in. However, for small patches I usually find it easiest to just go to the relevant line number and look at the code. Match that with the context lines, and it becomes easy to see which line(s) should be deleted or added.


John.

Please Inloggen or Create an account to join the conversation.

v3: Issue: Management buttons overlapping 9 years 3 months ago #3016

  • JohnSmith
  • JohnSmith's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 397
  • Thank you received: 71
I did the other changes that you suggested by hand... I prefer to know what is being changed rather than just running a patch...

Please Inloggen or Create an account to join the conversation.

v3: Issue: Management buttons overlapping 9 years 3 months ago #3018

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
I've normally done them by hand as well, but in this case there are some other very similar lines in the original file and it wasn't easy to eyeball which had changed, so I thought 'ok, let's run the patch' - and then got stuck. There is a lot more to git than I know, and I've never really been a command line kinda guy.

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ronmjultenJohnSmith
Time to create page: 0.052 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search