CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Git or other systems for source code and documentation management (https://www.cfd-online.com/Forums/openfoam/69858-git-other-systems-source-code-documentation-management.html)

olesen November 6, 2009 15:38

Git or other systems for source code and documentation management
 
  • This thread is a stub for discussions about the merits of particular source code management systems (scm) such as git, svn, hg, bazaar.
  • It is also a stub for discussions about how to organized cooperative efforts in sharing source code and/or documentation.

olesen November 12, 2009 06:31

Since OpenCFD is using git to provide bugfixes for OpenFOAM, there is no obvious reason to be using another scm with OpenFOAM projects. Especially since the capabilities of git have been stress-tested in various large projects, including the Linux kernel. This also means there is no particular fear that git will disappear in the near future.

Git may certainly seem confusing and cryptic to a new user, but with some minor learning effort it proves to be a trusty and very useful tool. In the hopes of being able to help, I have reworked a short presentation about starting with OpenFOAM and git and posted it in a blog format: http://olesenm.github.com/2009/11/12...nFOAM-and-git/

l_r_mcglashan November 12, 2009 07:40

That's a good blog. I set up a bare git repository (private one on the server at work) for custom solvers/libraries/utilities. We all cloned it and work on our own branches, pushing to the bare repository when we're happy that our solvers work well. So we use Git pretty much like we used SVN I suppose.

I also find the hooks quite useful, and I use post-receive on the bare repository, which sends an e-mail out when the repository has been pushed to. I've come across a small problem with sendmail (the post-receive script calls it to send the email out). If there are multiple, comma separated email addresses in the To: section, the emails won't be sent. I'm working on why that happens.

olesen November 12, 2009 08:43

Quote:

Originally Posted by l_r_mcglashan (Post 235984)
That's a good blog. I set up a bare git repository (private one on the server at work) for custom solvers/libraries/utilities. We all cloned it and work on our own branches, pushing to the bare repository when we're happy that our solvers work well. So we use Git pretty much like we used SVN I suppose.

I also find the hooks quite useful, and I use post-receive on the bare repository, which sends an e-mail out when the repository has been pushed to. I've come across a small problem with sendmail (the post-receive script calls it to send the email out). If there are multiple, comma separated email addresses in the To: section, the emails won't be sent. I'm working on why that happens.

Thanks for the feedback.

Regarding your problem with sending email. I took a quick look and also quickly ran into a similar issue.
Check that the mailing list is actually defined nicely:

$ git config hooks.mailinglist

Next try running the "/PATH/TO/post-receive-email refs/heads/master HEAD HEAD~1" from the command-line to see which errors it reports. This will help diagnose if the problems are with your config, with the hook, or with sendmail itself. Unfortunately, the "error:" message is also sent to stdout, which is probably why sendmail is so unhappy.

Using "git config --add hooks.mailinglist" adds a new entry each time, but this is not allowed. Take a look at your config file and see if you need to edit it to remove multiple 'mailinglist' entries. From what I can see, a text editor is the only option here.

l_r_mcglashan November 12, 2009 10:03

Yes, having multiple entries isn't allowed. git config --unset removes them, but it's easiest to do with a text editor, you're right. In the config I have:

mailinglist = address1@wherever,address2@somewhere

When the repository is pushed to, I get a "Mail delivery failed: returning message to sender" e-mail back to my user account mailbox with the following content:

<cut>SMTP error from remote mail server after MAIL FROM<cut>
<cut>malformed address:<cut>

The email addresses in the 'To:' section of the failed e-mail appear as they should, separated by commas.

Anyway, slightly off topic, but I'll post a resolution if I find one. The obvious is to create a mailing list/alias for each git repository.

Solution:

This has been resolved. We actually use Exim (sendmail softlinked to it). Exim had been updated twice since the original exim.conf file was written, and so that file was out of date.


All times are GMT -4. The time now is 19:08.