Different date settings in editors causing bogus code conflicts?

Different date settings in editors causing bogus code conflicts?

by Samuli Karevaara -
Number of replies: 4
I did a CVS update on a test Moodle 1.9, which was checked out with an anon account, having no modifications on it at all. I got code conflicts like the ones in the attached text file (got frustrated with the HTML editor getting smart abut the formatting).

Have you seen these? Are the differences in the date formatting throwing CVS off course?

I feel a gastric ulcer is just a few CVS merges away...
Average of ratings: -
In reply to Samuli Karevaara

Re: Different date settings in editors causing bogus code conflicts?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is just CVS getting confused. Just accept the later revision - the one after the =======. Most of the stuff on that line is just a comment to PHP, so it does not matter what it contains, but by taking the later revision, you should hopefully avoid future problems.
In reply to Tim Hunt

Re: Different date settings in editors causing bogus code conflicts?

by Samuli Karevaara -
Would there be a way to avoid this completely? Sometimes I get dozens of these. If it's a Moodle with local modifications, I have to click through carefully, not to miss the real conflicts. Over the years, there has been a lot of unnecessary code conflict resolving for me because of this.

If somebody updates a production site via CVS, then won't this break the site? A bogus conflict in /lib/moodlelib.php, for example. With no local modifications, I would have assumed that it is safe to update the site files via CVS.
In reply to Samuli Karevaara

Re: Different date settings in editors causing bogus code conflicts?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, I personally hate the CVS $Id$ tags because they only ever cause me grief when merging. However, I have been convinced by Martin and others that they serve a useful purpose for Moodle. Namely:
  1. They make it easy to generate http://docs.moodle.org/en/index.php?title=Development:Unmerged_files&oldid=42425 showing who is responsible for unmerged files. (I had to link to an old version of the page, because currently there is only one unmerged file, and it does not contain a $Id$ tag!)
  2. They allow people who report bugs, or ask for help in these forums, to easily tell us exactly which version of the code they have, without them having to know about CVS.
I accept that these are sufficient reasons for keeping the $Id$ things, but I don't like it, and I share your pain.
In reply to Tim Hunt

Re: Different date settings in editors causing bogus code conflicts?

by Samuli Karevaara -
True, I also understand the justifications. The culprit here is the CVS anyhoo, so there are ways around this without scrapping the $Id$ evil