Last modified: 2013-03-05 23:22:08 UTC
We need people to use git-review for the new Gerrit setup to work with topic branches. So we need people on Mac and Windows to be able to use it, so we need packages.
Although "apt-get" isn't available easily on Mac, "pip" via "easy_install" is available if Python is installed (which has a GUI .dmg installer for Mac). I updated one of the tutorials last week to include it. I guess that makes it good enough for Mac. Don't know about Windows.
Im sure i had seen it on labs or mw.org someone (MaxSem?) had put windows instructions...
(In reply to comment #3) > Im sure i had seen it on labs or mw.org someone (MaxSem?) had put windows > instructions... http://www.mediawiki.org/wiki/Git/Workflow#Prepare_to_work_with_gerrit
I have no idea who started spreading that git-review could not be installed on Mac OS X. It is already packaged as a python package. The magic commands are: sudo easy_install pip sudo pip install git-review pip is python package manager which is installed with Mac OS X. This make the bug Windows platform only, I have rephrased the summary.
SInce there's no such thing as packages in Windows, I assume it's a WONTFIX?
How about, whatever the equivalent of a package is? An installable executable thingy? Windows people, rephrase as necessary. The point is to make it a one-install process.
OK, no one has spoken up and said "I cannot install git-review on my OS," and Roan says people *can* use topic branches without git-review (even if it's a bit painful) so I'm lowering the priority on this. It's no longer a blocker for the March 21 migration.
Currently the hook commit-msg does not install so the gerrit windows instructions are totally broken.
Aaron fixed the instructions at http://www.mediawiki.org/wiki/Git/Workflow so I think people will be able to install ok on Windows.
This seriously needs to be done. I just spent the past 16-20hrs in getting the install done even though I had python and msysgit already installed. Windows users *don't like* having to go through CLIs. It would be real nice if someone made an executable GUI thingy for git review which would help with the commits and pushes. Maybe modify tortoisegit for this, since that is nice but doesn't work with git review. I hope someone gets round to actually doing this.
Reopening as a desired enhancement.
(In reply to comment #11) > Windows users *don't like* having to go through CLIs. It would be real nice if > someone made an executable GUI thingy for git review which would help with the > commits and pushes. Maybe modify tortoisegit for this, since that is nice but > doesn't work with git review. It's just one line to push for review though (I do the commits beforehand with the GUI) -- not too tricky?
(In reply to comment #13) > (In reply to comment #11) > > Windows users *don't like* having to go through CLIs. It would be real nice if > > someone made an executable GUI thingy for git review which would help with the > > commits and pushes. Maybe modify tortoisegit for this, since that is nice but > > doesn't work with git review. > > It's just one line to push for review though (I do the commits beforehand with > the GUI) -- not too tricky? Indeed. Batch file to run the full command on the specific directory? Might be able to do some DOS foo so it can be placed in PATH and work on the current directory
(In reply to comment #14) > (In reply to comment #13) > > (In reply to comment #11) > > > Windows users *don't like* having to go through CLIs. It would be real nice if > > > someone made an executable GUI thingy for git review which would help with the > > > commits and pushes. Maybe modify tortoisegit for this, since that is nice but > > > doesn't work with git review. > > > > It's just one line to push for review though (I do the commits beforehand with > > the GUI) -- not too tricky? > > Indeed. Batch file to run the full command on the specific directory? > > Might be able to do some DOS foo so it can be placed in PATH and work on the > current directory The pushing to git-review part isn't that tough. Its the installation process that's real tough. Most of that is following http://www.mediawiki.org/wiki/Git/Workflow#Windows Windows users are used to having msi or exe installers (or any other thingy that can do it) to do that kind of stuff. There's no point in having windows if installing a software is a bunch of CLI operations. The "package/exe/msi/thingy" needed is something that shows up with checkbox options for installing that stuff (or atleast the git-review stuff if not the others).
> The pushing to git-review part isn't that tough. Its the installation process > that's real tough. > > Most of that is following http://www.mediawiki.org/wiki/Git/Workflow#Windows This is what I still don't understand. The "manual" option takes about 3 minutes to set up, then about 30 seconds for every additional repository. Why would anyone want to use the package method?
(In reply to comment #16) > > The pushing to git-review part isn't that tough. Its the installation process > > that's real tough. > > > > Most of that is following http://www.mediawiki.org/wiki/Git/Workflow#Windows > > This is what I still don't understand. The "manual" option takes about 3 > minutes to set up, then about 30 seconds for every additional repository. Why > would anyone want to use the package method? Because working via CLI is a break in the workflow. Maybe there are people who like to write complex program code with vi only and use text browsers. But the majority use a GUI for programming and browsing... and the logical workflow to commit is using a GUI for Git. Working with TortoiseSVN makes fun, working with Git on a shell does not make fun :-( That's why I filed bug 35467 - Write docu/how-to for Windows with a GUI client
(In reply to comment #17) > Because working via CLI is a break in the workflow. Maybe there are people who > like to write complex program code with vi only and use text browsers. But the > majority use a GUI for programming and browsing... and the logical workflow to > commit is using a GUI for Git. It's not a break in the workflow for installation though, and that's what this bug is notionally about. Besides, as I said in comment #13, running "git push-for-review" is only a minor break in the development workflow anyway.
(In reply to comment #18) > (In reply to comment #17) > > Because working via CLI is a break in the workflow. Maybe there are people who > > like to write complex program code with vi only and use text browsers. But the > > majority use a GUI for programming and browsing... and the logical workflow to > > commit is using a GUI for Git. > > It's not a break in the workflow for installation though, and that's what this > bug is notionally about. Besides, as I said in comment #13, running "git > push-for-review" is only a minor break in the development workflow anyway. Sorry. Yes you are right, it is not a break in that workfow. My fault that I think Windows=GUI, always :-(
(In reply to comment #11) > This seriously needs to be done. I just spent the past 16-20hrs in getting the > install done even though I had python and msysgit already installed. > > Windows users *don't like* having to go through CLIs. It would be real nice if > someone made an executable GUI thingy for git review which would help with the > commits and pushes. Maybe modify tortoisegit for this, since that is nice but > doesn't work with git review. > > I hope someone gets round to actually doing this. For Windows there is "Git for Windows" (http://msysgit.github.com/) as a GUI tool which also includes Git Bash (CLI tool). I don't understand why people are making it so complicated drawing pip and other packages into the picture, or am I missing something here?
(In reply to comment #20) > I missing something here? Yes. Changes can't simply be committed and pushed (since we don't have our own public remotes like on github but submit patches for review on master). They must be committed and then "git -review"ed. For that the gitreview file needs to be installed via pip. See http://www.mediawiki.org/wiki/Git/Workflow#Windows or https://labsconsole.wikimedia.org/wiki/Help:Git#Windows Since gerrit doesn't work without the git review file, the installation is necessary.
(In reply to comment #21) > (In reply to comment #20) > > I missing something here? > Yes. > > Changes can't simply be committed and pushed (since we don't have our own > public remotes like on github but submit patches for review on master). They > must be committed and then "git -review"ed. For that the gitreview file needs > to be installed via pip. See http://www.mediawiki.org/wiki/Git/Workflow#Windows > or https://labsconsole.wikimedia.org/wiki/Help:Git#Windows > > Since gerrit doesn't work without the git review file, the installation is > necessary. This is not true. You can skip git-review entirely by doing `git push origin HEAD:refs/for/master` but typing `git review` is easier. Also, `git review -s` makes downloading and installing the pre-commit hook easier. But really, git-review isn't *required* for anything.
> Since gerrit doesn't work without the git review file, the installation is > necessary. Installation of the file is useful, yes, but I have never understood why installing it as a package is required.
Created attachment 10485 [details] Self-made installer made to simplify the Git set up process This is an installer I made via NSIS [http://nsis.sourceforge.net] for Windows, it will automatically download and install msysgit, Putty, Pageant, Python, setuptools, pip, git-review and optionally TortoiseGit. It will also add all the relevant environment paths and then prompt a reboot. I've made two versions, 32-bit and 64-bit. Could someone please test these, preferably in an environment previously untouched by Git or any of those tools? I went through countless hours of debugging the NSIS scripts (first time I am writing one) and will likely have made some mistakes.
(In reply to comment #24) > Created attachment 10485 [details] > Self-made installer made to simplify the Git set up process > Does it also apply the patch at http://www.mediawiki.org/wiki/Git/Workflow#Windows ? I know it was annoying getting git-review to actually download the git hook.
Also, it would be nice to see any source code.
(In reply to comment #25) > (In reply to comment #24) > > Created attachment 10485 [details] > > Self-made installer made to simplify the Git set up process > > > > Does it also apply the patch at > http://www.mediawiki.org/wiki/Git/Workflow#Windows ? I know it was annoying > getting git-review to actually download the git hook. Not yet, I'll implement that maybe tomorrow, if I have any time. Source code: Yh, the code is a little messy at the moment and the NSIS scripting language is quite hard to understand at first, its really a weird one. I have used a variety of plugins and include files, so I'll have to pick these out and put them along with the main file. Depending on my time schedule, it may take a few days. But I appreciate any feedback for the current installer version.
Created attachment 10487 [details] Self-made installer made to simplify the Git set up process (Includes git-review Patch) Same as the previous attachment, except that it includes the git-review patch. Source code: Still pending, as I find time to put it all together into one zip file.
Khaled, can you publish the installer sources (it's NSIS, right?) -patch-need-review, it's not a patch and can't be reviewed as there's no source code.
Created attachment 10497 [details] Same as previous, but now includes source code Source code along with the executables is now available in this attachment. I had used a variety of include files and plugins, so I had to set up a plain installation of NSIS to find out which files I added. I included links to where I downloaded those plugins from in two sources.txt files. To compile, all is needed is to download and install NSIS from http://nsis.sourceforge.net/, move the included files over to their respective folder and then start the compiler. Any feedback is much appreciated.
Do we really need separate x64 and x86 versions?
(In reply to comment #31) > Do we really need separate x64 and x86 versions? There are 64-bit versions of Python, Setuptools and Tortoisegit available. From my experience 32-bit versions of these will install just fine on 64-bit systems, except for TortoiseGit where its installer just aborts. For that reason, I created the 64-bit installer, which is perhaps more convinient for people who want 64-bit versions of things. Though, I suppose I could try to detect the system in the script, and therefore eliminate the need for two installers.
Created attachment 10498 [details] Windows Installer OK. Per reedy's comment, I have now made only one version. This one detects whether the system is x86 or x64 and downloads & installs appropriately. I have also added a switch (/debug), if this is given, then the folder where all the installers and batch files are contained in, is preserved. It can be found in the User's temp folder named as 'gitdeveloper'. As before, the source code is provided along with the .exe file. So, if someone please could run it separately on x86 & x64 windows operating systems and let me know the results, a virtual machine might come in handy for this.
(In reply to comment #33) > Created attachment 10498 [details] > Windows Installer > > OK. Per reedy's comment, I have now made only one version. This one detects > whether the system is x86 or x64 and downloads & installs appropriately. > I have also added a switch (/debug), if this is given, then the folder where > all the installers and batch files are contained in, is preserved. It can be > found in the User's temp folder named as 'gitdeveloper'. Nice, thanks. It helps save some confusion for less technical users
Tried it on a fresh XP: Max@VMXP ~ $ export `ssh-agent` sh.exe": export: `SSH_AUTH_SOCK;': not a valid identifier sh.exe": export: `SSH_AGENT_PID;': not a valid identifier sh.exe": export: `1740;': not a valid identifier Max@VMXP ~ $ git review git: 'review' is not a git command. See 'git --help'.
(In reply to comment #35) > Tried it on a fresh XP: > Hmm. That's weird. Could you try it again, this time with the /debug switch when you launch the installer file? This basically retains the folder "gitdeveloper" found in %temp%. In there, should be the downloaded files, the created batch files and the logs of the launched batch files. So, if you could please check those and let me know if there is an error in them. You could open the dllist.xml file and check if all the executables have been downloaded properly, then just e-mail me the rest of the files.
(In reply to comment #35) > Tried it on a fresh XP: > OK. I think I located the weak point of the installer: Absolute paths in batch files, these tend to be problematic, so I am just going to put a "SET PATH" command in the batch files to temporarily change the PATH variable for the installers to run correctly, the permanent change is done by the main installer and works after a reboot. I'll post the new installer later today.
Created attachment 10513 [details] Windows Installer Yet, another update. - Introduced (temporary) SET PATH in setuptools (x64 only) and pip installation batch files and done away with the unstable absolute path method. - Introduced the PuTTY installer, instead of simply copying executable files to the System directory and creating shortcuts for it. So, if you could test it now again Max (and anyone who wishes to).
@ Khaled El Mansoury Thanks a lot for trying to make this easier for windows users. Sorry I can't help with the testing since I've already installed it. Also, once the installer starts working properly, maybe you could look into the possibility to bypassing pip per http://www.mediawiki.org/wiki/User_talk:Sumanah#Installing_Git_review_on_windows_14746 Also, would it be possible to have a express install/custom install option at the beginning with everything optional in custom, so that people who have python and not git, or git but not python, can uncheck the unneeded software before installing. E.g: github users will probably already have git, Putty, Tortoisegit but may not have python. Thanks a lot for the effort you're putting into this. PS:Someone should look into the possibility of bypassing pip during manual install (see the link), regardless of what happens with the installer.
Created attachment 10540 [details] Windows Installer @Siddhartha Ghai You're welcome. I don't know much about Python, pip and git-review myself unfortunately, so for the moment I think this installer will suffice. The installation with the installer is quick and easy. I have now marked all sections of the installer as optional, but included relevant notes about how they are dependant of each other in their respective descriptions, which appear when one hover's over a section. That should give people some flexibility.
I've now tested the installer with success on a fresh copy of Windows XP (32-bit) and on a Windows 7 (x64) PC. I think we are ready to put a link to this on mw.org and labs. By the way, why do we have two articles on Git on Windows, one on labs and one on mw.org? https://labsconsole.wikimedia.org/wiki/Help:Git#Windows http://www.mediawiki.org/wiki/Git/Workflow#Windows Is there any need for this, or can we get rid of one (labs) and put a soft redirect from it to the other?
(In reply to comment #17) > (In reply to comment #16) > > > The pushing to git-review part isn't that tough. Its the installation process > > > that's real tough. > > > > > > Most of that is following http://www.mediawiki.org/wiki/Git/Workflow#Windows > > > > This is what I still don't understand. The "manual" option takes about 3 > > minutes to set up, then about 30 seconds for every additional repository. Why > > would anyone want to use the package method? > > Because working via CLI is a break in the workflow. Maybe there are people who > like to write complex program code with vi only and use text browsers. But the > majority use a GUI for programming and browsing... and the logical workflow to > commit is using a GUI for Git. > > Working with TortoiseSVN makes fun, working with Git on a shell does not make > fun :-( > > That's why I filed bug 35467 - Write docu/how-to for Windows with a GUI client Not tried, but Tortoics GIT (http://code.google.com/p/tortoisegit/) may be similar to TortoiseSVN
We have instructions to install git-review on Windows at http://www.mediawiki.org/wiki/Gerrit/git-review#Windows