[PATCH] Add ignore for Cmake and other generated files
Moderator: Committer
[PATCH] Add ignore for Cmake and other generated files
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.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [PATCH] Add ignore for Cmake and other generated files
The patch doesn't want to apply for me... TortoiseSVN just pops up an empty dialog with an X error icon, then closes.
Re: [PATCH] Add ignore for Cmake and other generated files
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.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.
Re: [PATCH] Add ignore for Cmake and other generated files
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.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [PATCH] Add ignore for Cmake and other generated files
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.
Re: [PATCH] Add ignore for Cmake and other generated files
This is weird. Maybe it's because I ran svn diff from the FreeOrion folder, not from the repository root folder?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.
You'd never have such problems with git there would've been a million other
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [PATCH] Add ignore for Cmake and other generated files
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.zhur wrote:Maybe it's because I ran svn diff from the FreeOrion folder, not from the repository root folder?
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
Re: [PATCH] Add ignore for Cmake and other generated files
This is described here. The problem is that I've only got version 1.6.Geoff the Medio wrote:When I make a similar patch, it has a few more lines at the top that yours lacks:
Re: [PATCH] Add ignore for Cmake and other generated files
I've done some more investigation on that matter and found this in an online svn book:zhur wrote:This is described here. The problem is that I've only got version 1.6.Geoff the Medio wrote:When I make a similar patch, it has a few more lines at the top that yours lacks:
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):...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...
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.
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.
Re: [PATCH] Add ignore for Cmake and other generated files
Well, you need to use a "svn patch" not just patch.Vezzra wrote:So you'd have to upgrade to subversion 1.7 to provide a patch that we can apply.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.
Here's the script (rename it to "fo-ignore-cmake.sh", don't forget to make it executable and run from the svn root).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.
- Attachments
-
- fo-ignore-cmake.txt
- (2.22 KiB) Downloaded 52 times
Re: [PATCH] Add ignore for Cmake and other generated files
That's what you need subversion 1.7 for. The "svn patch" command was introduced in 1.7zhur wrote:Well, you need to use a "svn patch" not just patch.Vezzra wrote:So you'd have to upgrade to subversion 1.7 to provide a patch that we can apply.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.
Done.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).
Committed as rev 5223.