Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Marcelo Barroso發表於
Number of replies: 8

Hi all.

My installation of Moodle is working fine, 2.3.1+ (Build: 20120831).

Today, I tried to upgrade via GIT (it was installed this way) to 2.3.2+, using the tutorial on this Moodle page (http://docs.moodle.org/23/en/CLI#Upgrading_via_command_line), but I received this message after the "git pull" command:

Updating 9815783..7413ce9
error: Entry 'admin/environment.xml' not uptodate. Cannot merge.

As I said, my moodle installation is working fine. However, to use the 5.3 version of PHP I had to change some configuration on the server, because it's a shared server and the standard PHP version is 5.2.

Is it possible that GIT is checking the environment and found the PHP 5.2 instead of 5.3? Which other possibility there is for this problem? How to solve it?

 

Thank you all. Best regards.

評比平均分數: -
In reply to Marcelo Barroso

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

You've made changes in admin/environment.xml and not committed them.

If you meant to do that, then...

git commit -a -m 'some message about your changes'

if you didn't

git checkout admin/environment.xml

will return it to the old git version

評比平均分數:Useful (1)
In reply to Howard Miller

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Marcelo Barroso發表於

Thank you Howard.

Yes, it seems to be the problem. However, after I checked out the 'environment.php', the 'git pull' command complained because of some file at the backup module. I checked out too. Now, it is complainning because of another file.

I have not changed any file within the original installation. I added two themes, only, and changed some translations.

How can I update the whole system and then upgrade?

I tried the command 'git checkout MOODLE_23_STABLE', but it said: "Your branch is behind 'origin/MOODLE_23_STABLE' by 83 commits, and can be fast-forwarded". Is it a fast way to fix it?

Thanks.

In reply to Marcelo Barroso

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

Before you do anything else... do


git status


...this will show what files have been changed (you must have changed something). To find out what has been changed, pick a file and do

git diff <filename>

I'm guessing you'll find that it's just permissions (which git regards as a change). If that's the case and you don't care about permissions...

git config core.filemode false

...and then do git status again to make sure it's clean

評比平均分數:Useful (1)
In reply to Howard Miller

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Marcelo Barroso發表於

Hi Howard,

Thank you again.

It's not that I don't care about permissions, but I changed to 0755 as instructed through the installation guidelines. It seems to be the problem, as the diff command reports this:

old mode 100644
new mode 100755

What is the problem of reseting the permissions as 0644 instead of 0755? Or this is something I will have to change every time there is an upgrade?

 

Thanks. Marcelo.

In reply to Marcelo Barroso

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Itamar Tzadok發表於

Try

git config --global core.filemode false

微笑

In reply to Itamar Tzadok

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Marcelo Barroso發表於

Thank you, Itamar, but it gave the same problem.

After the command you said, I tried the "git pull"; it complained about on file; I asked the "git diff" of this file and it said the samething before, about the file permission.

So, I'm still stucked.

 

Thanks.

In reply to Marcelo Barroso

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

then you did the config command wrong. That tells git to ignore file mode changes. Try again 眨眼

評比平均分數:Useful (1)
In reply to Howard Miller

Re: Upgrading to 2.3.2 via GIT - Environment problem - But it shouldn´t

Marcelo Barroso發表於

Ok, now it worked. It was a simple command, I don't know how I could have done wrong.

But anyway, thank you all for the help.

 

Best regards.