[PATCH] Add ignore for Cmake and other generated files

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

[PATCH] Add ignore for Cmake and other generated files

#1 Post by zhur »

Hello. This is a patch that adds more stuff to svn:ignore properties in various places. These are mostly Cmake build generated files, Makefiles, GG tests and freeorion binaries (basically everything that shows in my svn status after fresh checkout and build). It will probably ease developing the game for Linux.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]


User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Add ignore for Cmake and other generated files

#2 Post by Geoff the Medio »

The patch doesn't want to apply for me... TortoiseSVN just pops up an empty dialog with an X error icon, then closes.

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: [PATCH] Add ignore for Cmake and other generated files

#3 Post by zhur »

Geoff the Medio wrote:The patch doesn't want to apply for me... TortoiseSVN just pops up an empty dialog with an X error icon, then closes.
That's bad. Unfortunately I can't try to apply the patch by myself since my version of SVN doesn't have patch command (sic!). I'll try to redo the whole thing tomorrow from scratch.

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: [PATCH] Add ignore for Cmake and other generated files

#4 Post by zhur »

Here are the new patches: I splitted the change into three - for GG, for FreeOrion base folder and outstanding ignore for 'util/Version.cpp' as I don't know for sure if it should be ignored.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

[The extension patch has been deactivated and can no longer be displayed.]

[The extension patch has been deactivated and can no longer be displayed.]


User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Add ignore for Cmake and other generated files

#5 Post by Geoff the Medio »

The patches still fail to apply for me. I suspect it's an issue with my method of applying, or TortoiseSVN. I can manually replicate the ignore for Version.cpp, but the others have enough stuff that I'd probably miss something. So, I'll leave this for someone else to attempt to apply... I asked Vezzra, though he might be a few days due to being busy at the moment.

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: [PATCH] Add ignore for Cmake and other generated files

#6 Post by zhur »

Geoff the Medio wrote:The patches still fail to apply for me. I suspect it's an issue with my method of applying, or TortoiseSVN. I can manually replicate the ignore for Version.cpp, but the others have enough stuff that I'd probably miss something. So, I'll leave this for someone else to attempt to apply... I asked Vezzra, though he might be a few days due to being busy at the moment.
This is weird. Maybe it's because I ran svn diff from the FreeOrion folder, not from the repository root folder?
You'd never have such problems with git :wink: there would've been a million other

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Add ignore for Cmake and other generated files

#7 Post by Geoff the Medio »

zhur wrote:Maybe it's because I ran svn diff from the FreeOrion folder, not from the repository root folder?
Usually it automatically detects that I'm applying a patch to the wrong relative path, and suggests a better one, or pops up saying specifically that it can't find the right files. This just pops up an empty dialog and then quits.

When I make a similar patch, it has a few more lines at the top that yours lacks:

Code: Select all

Index: .
===================================================================
--- .	(revision 5209)
+++ .	(working copy)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+Version.cpp

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: [PATCH] Add ignore for Cmake and other generated files

#8 Post by zhur »

Geoff the Medio wrote:When I make a similar patch, it has a few more lines at the top that yours lacks:
This is described here. The problem is that I've only got version 1.6.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: [PATCH] Add ignore for Cmake and other generated files

#9 Post by Vezzra »

zhur wrote:
Geoff the Medio wrote:When I make a similar patch, it has a few more lines at the top that yours lacks:
This is described here. The problem is that I've only got version 1.6.
I've done some more investigation on that matter and found this in an online svn book:
...You might also have noticed the nonstandard way that Subversion currently displays property differences. You can still use svn diff and redirect its output to create a usable patch file. The patch program will ignore property patches—as a rule, it ignores any noise it can't understand. This does, unfortunately, mean that to fully apply a patch generated by svn diff using patch, any property modifications will need to be applied by hand.

Subversion 1.7 improves this situation in two ways. First, its nonstandard display of property differences is at least machine-readable—an improvement over the display of properties in versions prior to 1.7. But Subversion 1.7 also introduces the svn patch subcommand, designed specifically to handle the additional information which svn diff's output can carry, applying those changes to the Subversion working copy. Of specific relevance to our topic, property differences present in patch files generated by svn diff in Subversion 1.7 or better can be automatically applied to a working copy by the svn patch command...
So to produce and apply patches that transfer property changes, you need subversion 1.7. I've tried to apply your patches, but only get (as is to be expected):

Code: Select all

user@UbuntuPC:~/SoftwareProjekte/FO$ patch -p0 <'/home/user/Downloads/fo-cmake-and-exec-ignore.patch' 
patch: **** Only garbage was found in the patch input.
So you'd have to upgrade to subversion 1.7 to provide a patch that we can apply.

Or you can post a shell script containing all the comands you ran to make these property changes. Then I can run this script and commit the changes.

zhur
Space Floater
Posts: 38
Joined: Thu Aug 09, 2012 8:15 am

Re: [PATCH] Add ignore for Cmake and other generated files

#10 Post by zhur »

Vezzra wrote:

Code: Select all

user@UbuntuPC:~/SoftwareProjekte/FO$ patch -p0 <'/home/user/Downloads/fo-cmake-and-exec-ignore.patch' 
patch: **** Only garbage was found in the patch input.
So you'd have to upgrade to subversion 1.7 to provide a patch that we can apply.
Well, you need to use a "svn patch" not just patch.
Vezzra wrote:Or you can post a shell script containing all the comands you ran to make these property changes. Then I can run this script and commit the changes.
Here's the script (rename it to "fo-ignore-cmake.sh", don't forget to make it executable and run from the svn root).
Attachments
fo-ignore-cmake.txt
(2.22 KiB) Downloaded 52 times

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: [PATCH] Add ignore for Cmake and other generated files

#11 Post by Vezzra »

zhur wrote:
Vezzra wrote:

Code: Select all

user@UbuntuPC:~/SoftwareProjekte/FO$ patch -p0 <'/home/user/Downloads/fo-cmake-and-exec-ignore.patch' 
patch: **** Only garbage was found in the patch input.
So you'd have to upgrade to subversion 1.7 to provide a patch that we can apply.
Well, you need to use a "svn patch" not just patch.
That's what you need subversion 1.7 for. The "svn patch" command was introduced in 1.7 ;)
zhur wrote:Here's the script (rename it to "fo-ignore-cmake.sh", don't forget to make it executable and run from the svn root).
Done.

Committed as rev 5223.

Post Reply