Here is the way I found to successfully update MobileFrontend via git.
cd extensions rm -r MobileFrontend git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MobileFrontend.git
That is right, reinstalling from scratch.
I originally thought just git pull would update it. But it does not.
If there is a better way it perhaps could be mentioned somewhere in https://www.mediawiki.org/wiki/Extension:MobileFrontend#Download https://www.mediawiki.org/wiki/Manual:Upgrading#Upgrade_extensions , https://www.mediawiki.org/wiki/Download_from_Git#Keeping_up_to_date . https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_Media... mentions git submodule update --init --recursive but that did not help.
Anyway, no big deal. reinstalling isn't to net-intensive.
Thanks for sharing this. I am a little confused by your instructions - had you already cloned the MobileFrontend repository previously (eg before the steps you laid out in your instructions)? If so, git pull should have worked (unless you were possibly on a branch or in a detached state).
On Sun, Apr 6, 2014 at 6:03 PM, 積丹尼 Dan Jacobson jidanni@jidanni.orgwrote:
Here is the way I found to successfully update MobileFrontend via git.
cd extensions rm -r MobileFrontend git clone --depth 1 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MobileFrontend.git
That is right, reinstalling from scratch.
I originally thought just git pull would update it. But it does not.
If there is a better way it perhaps could be mentioned somewhere in https://www.mediawiki.org/wiki/Extension:MobileFrontend#Download https://www.mediawiki.org/wiki/Manual:Upgrading#Upgrade_extensions , https://www.mediawiki.org/wiki/Download_from_Git#Keeping_up_to_date .
https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_Media... mentions git submodule update --init --recursive but that did not help.
Anyway, no big deal. reinstalling isn't to net-intensive.
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
The problem is if the user has already cloned wikimedia in the main directory, and now clones MobileFrontend to the extensions directory, any git pulls even in the extensions directory will only update the main directory.
Ah, I see - that makes sense. It is tricky to nest git repositories within one another. There are some drawbacks to your approach - namely that the '--depth' option will create a shallow clone. According to the git-clone manual:
'A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.'
So if you don't plan to clone from your local repo or to submit patches, you should be fine. Otherwise, you will need to try another approach.
To get around this on one of my dev setups, I solve this problem slightly differently. I have Mediawiki core checked out to one directory, and all of my extensions checked out into a completely different directory - eg ~/Dev/wikimedia_git/mediawiki and ~/Dev/wikimedia_git/extensions/ respectively. I then symlink individual extensions to the Mediawiki install. This keeps the repositories independent, however there are some nuances with this approach that can also get you into trouble. Namely if you ever check out a branch of the mediawiki repository that as things already in the 'extensions' directory, you may get all your symlinks overwritten.
How do other folks deal with this?
On Mon, Apr 7, 2014 at 9:23 PM, 積丹尼 Dan Jacobson jidanni@jidanni.orgwrote:
The problem is if the user has already cloned wikimedia in the main directory, and now clones MobileFrontend to the extensions directory, any git pulls even in the extensions directory will only update the main directory.
I also use the symlink technique On 8 Apr 2014 09:15, "Arthur Richards" arichards@wikimedia.org wrote:
Ah, I see - that makes sense. It is tricky to nest git repositories within one another. There are some drawbacks to your approach - namely that the '--depth' option will create a shallow clone. According to the git-clone manual:
'A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.'
So if you don't plan to clone from your local repo or to submit patches, you should be fine. Otherwise, you will need to try another approach.
To get around this on one of my dev setups, I solve this problem slightly differently. I have Mediawiki core checked out to one directory, and all of my extensions checked out into a completely different directory - eg ~/Dev/wikimedia_git/mediawiki and ~/Dev/wikimedia_git/extensions/ respectively. I then symlink individual extensions to the Mediawiki install. This keeps the repositories independent, however there are some nuances with this approach that can also get you into trouble. Namely if you ever check out a branch of the mediawiki repository that as things already in the 'extensions' directory, you may get all your symlinks overwritten.
How do other folks deal with this?
On Mon, Apr 7, 2014 at 9:23 PM, 積丹尼 Dan Jacobson jidanni@jidanni.orgwrote:
The problem is if the user has already cloned wikimedia in the main directory, and now clones MobileFrontend to the extensions directory, any git pulls even in the extensions directory will only update the main directory.
-- Arthur Richards Software Engineer, Mobile [[User:Awjrichards]] IRC: awjr +1-415-839-6885 x6687
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
That's not the case for me. git pull pulls changes for the first repository it finds when going up the directory structure (starting from current directory).
On 04/07/2014 09:23 PM, 積丹尼 Dan Jacobson wrote:
The problem is if the user has already cloned wikimedia in the main directory, and now clones MobileFrontend to the extensions directory, any git pulls even in the extensions directory will only update the main directory.
Mobile-l mailing list Mobile-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mobile-l
On Wed, Apr 9, 2014 at 1:41 AM, Juliusz Gonera jgonera@wikimedia.org wrote:
That's not the case for me. git pull pulls changes for the first repository it finds when going up the directory structure (starting from current directory).
Me too.