For the benefit of those of us using the git mirror of the simutrans SVN ;D it would be helpful if a .gitignore file could be put in the top directory. A suitable file is attached (zipped).
would there appear problems with the already existing mirror on github? otherwise this can go in trunk quickly.
Actually, hold off on that.
I'm sure that it's OK to add a .gitignore file which ignores .d and .o files, .exe files, and config.default -- that will definitely work and is definitely desirable.
But I realized that for some reason people have been committing .sln and .vcproj.* files to the tree. I'm not sure why. So maybe they shouldn't be ignored? Or maybe they shouldn't be committed to SVN? I don't use Windows so I don't care about them.
There are no *.o and *.d in the SVN. Thus it is up to the user to not commit garbage.
The MSVC project files are very useful for developing and debugging, since this works so much better than any other IDE I encoutered so far (on MS Windows and Linux).
Furthermore: This project is using SVN. If you want to use GIT you have to know what you are doing. Thus I will not put any git (or whatever other version management system) stuff into an SVN repository.
On a sidenote: Before asking: Why not use git then entirely: Honestly I am not very enthusiastic to changing revision management systems every five years. I rather spend my time with more useful stuff than studying the syntax and way of working of rms.
neroden: It's simple. These "project files" tell what files should IDE load & include info for build, so that makes them an equivalent of makefile. However, they also include "local" settings, most notably include & binary directories. So, every developer using them (directly) has modifications in working copy. If they do the simplest "svn ci" without additional care, these files will end up being committed, too. It's quite an annoyance... but not too big :)
.gitignore exists for the exact same purpose as svn::ignore, to avoid spurious nonsense in diffs. svn::ignore should include .d and .o files if it doesn't already; it does on the majority of C and C++ based SVN repositories I have used. I just checked, and while I'm at it, your svn::ignore settings are wrong. They fail to ignore object files, and they do ignore config.template, which they definitely shouldn't. You should change them to this:
*.d
*.o
config.default
sim
sim.exe
Which doesn't answer my question.... though VS did answer it.
OK, that's pointless, stupid, and biased. I remember working on a repo which had 'ignore' files for SCCS, RCS, CVS, and SVN in order to ensure smooth compatibility with people who liked to use obsolete revision control systems, and it was never a h****le. I mean, yeah, I can put in local ignore files in git, but I do try to do things the most cooperative way. EDIT: Sorry to sound so irritated. As I said I can handle things locally, I'll just have to tell anyone else who cares how to do so locally as well.
FYI, Git wasn't written by RMS and does not represent his way of working. I believe he uses SVN. Git was Linus Torvalds' project.
...which belongs in SVN....
...which doesn't belong in SVN. Got it.
Got it. MSVC is hostile to any form of shared version control. Why am I not surprised. That makes it rather hard to decide whether they should be 'ignored', doesn't it -- I guess they shouldn't be.
One of the ways to deal with this is to have two separate project files - versioned and working. It's not perfect but reasonable since intended modifications are rare...
@prissi: Imho the addition of one file to support others helping with the development is a very small addition to the repository. Moreover, since this is a once-and-forget operation. Its very unlikely that this file has to be constantly updated.
On a sidenote, in the openttd repository are more than one such *ignore file, they have even several MS-project files there for different versions of MS-Visual Studio.
config.template is under revision control, last time I checked, config.default is not. Furthermore, any submit to the repository is filtered through several hooks on trons server to avoid spurious whitespace changes, mixing of CR and so on. Also currently only three people submit to the repository, and they check the submits quite well. Furthermore, since any source code submit on windows anyway needs to explicitely set svn:eol-style native, so you have to think anyway twice what you are doing.
I am not aware of any svn::ignore setting, and I am not even sure, how I could set or qurey this. This sounds rather like something on your side of installation. (But I am no admin of the repository, this burden is with tron.)
Concerning the Sln/vcproj files. Usually local settings are in the Simutrans.vcproj.MACHINE.USER.user files, and in simutrans.sou. If you have a default installation, you should not need to update any MSVC files.
There are local changes to these files unfortunately. Any change to include/lib directories is written in the .vcproj files :(
Well, but the libs are neccessary to link the program ... I tried on three computers and I could use the same file on all of those without any changes.
How to query it? I think this is a server side setting, which I cannot access at all.
cd to a checked out copy of 'trunk', so that that directory is the current directory (that is '.' meaning 'current directory' in the commands below)
svn proplist .
You'll see the name of the properties set on the 'trunk' directory
svn propget svn:ignore .
You'll see the value of the svn:ignore property on the 'trunk' directory
Finally, the following will set the svn:ignore property to a suitable value for the 'trunk' directory
svn propset svn:ignore "*.d *.o sim sim.exe" .
svn commit
It's all in the SVN "Redbook" which I read a few years back. Or in 'svn help....'
@prissi: it is not an extra file. Can be found in TortoiseSVN -> Properties as well.
Do
not change svn:ignore to this value. The current setting is perfectly fine:
1. *.o files are ignored by SVN by default, so there is no point in ignoring them explicitly. From the SVN book http://svnbook.red-bean.com/en/1.5/svn.advanced.confarea.html (http://svnbook.red-bean.com/en/1.5/svn.advanced.confarea.html):
2. config.* is ignored on purpose, so other config.foo files, if you use any, are ignored, too, not just config.default. config.template is not ignored by SVN, of course, because by adding the file to the repo SVN was explicitly told to track the file, so it does not ignore it (git handles this similarly). From the SVN book http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.ignore.html (http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.ignore.html):
In short: Leave svn:ignore as it is.
Aha, so that's what you were thinking. That sounds vaguely reasonable. However, global-ignores is of course a per-client configuration option, and you can't rely on all clients to set global-ignores the same way,...
Oh, of course, that makes sense.
....uh, and that means that patterns for the various .vcproj, .sln, and other related files should be put into the ignore lists. The ones which have been committed already will not be ignored.....
Including those files is actually needed to build simutrans using MSVC ...
& config.default is actually needed to build simutrans using GCC. Irrelevant according to Tron.
Config.default needs to be changed to be able to built it. Everybody has a different config.default on different platforms. This is not true for the SVN and VCPROJ files, which contain only the user independent settings. The dependent ones are in Simutrans.vcproj.JAPAN2.prissi.user (depending on computer and username of course)
I buy this argument.
I do not know what exactly should be ignored, because I do not use MSVC. According to prissi something like *.vcproj.* should be included on the list, too. Would somebody show the output of svn status (or git status) when using MSVC?
This is the reason, why it is ignored: It is not part of the repo and never should be. It also should not show up on svn status. svn status should only show files with the state "?", which you forgot to svn add. Accordingly, MSVC's user specifc files should be ignored, too, so they do not clutter up the view, when inspecting the status of the working copy.
As I have written above, if somebody shows me the output of svn status, then I can compile a ignore list, which handles MSVC's user specific files, too.
I think such an ignore list is not needed, since one should never do a svn add * anyway. But ok, the files procuded by MSVC
? simutrans/trunk/Simutrans.ncb
? simutrans/trunk/Release
? simutrans/trunk/Debug
? simutrans/trunk/Simutrans.vcproj.JAPAN2.prissi.user
? simutrans/trunk/Simutrans.suo
The 8.x and 10.x produce additional files too. I would not bother with this too much,as only me and Dwachs use MSVC and can add files to the repo.
The ignore list is specifically for files, which are not added to the repo, so they do not show up in svn status. On the contrary, svn:ignore (and .gitignore) has absolutely no effect on files, which are added to the repo. It is only to hide files, which are not tracked. In the ideal case the output of svn status is empty (if you did not modify any tracked files, of course). Having a bunch of files always showing up with "?" just hides files, which you accidentally forgot to add.