Different date settings in editors causing bogus code conflicts?

Different date settings in editors causing bogus code conflicts?

από Samuli Karevaara -
Αριθμός απαντήσεων: 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...
Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Samuli Karevaara

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

από Tim Hunt -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία 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.
Σε απάντηση σε Tim Hunt

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

από 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.
Σε απάντηση σε Samuli Karevaara

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

από Tim Hunt -
Φωτογραφία Core developers Φωτογραφία Documentation writers Φωτογραφία Particularly helpful Moodlers Φωτογραφία Peer reviewers Φωτογραφία 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.