Last modified: 2013-03-05 23:22:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37145, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35145 - Make git-review easier to install on Windows
Make git-review easier to install on Windows
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Git/Gerrit (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Khaled El Mansoury
:
Depends on:
Blocks: 22596
  Show dependency treegraph
 
Reported: 2012-03-11 03:12 UTC by Sumana Harihareswara
Modified: 2013-03-05 23:22 UTC (History)
15 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Self-made installer made to simplify the Git set up process (237.20 KB, application/x-zip-compressed)
2012-04-29 20:23 UTC, Khaled El Mansoury
Details
Self-made installer made to simplify the Git set up process (Includes git-review Patch) (242.44 KB, application/x-zip-compressed)
2012-04-30 18:11 UTC, Khaled El Mansoury
Details
Same as previous, but now includes source code (316.01 KB, application/x-zip-compressed)
2012-05-02 10:45 UTC, Khaled El Mansoury
Details
Windows Installer (195.31 KB, patch)
2012-05-02 16:22 UTC, Khaled El Mansoury
Details
Windows Installer (195.12 KB, application/x-zip-compressed)
2012-05-04 20:08 UTC, Khaled El Mansoury
Details
Windows Installer (196.91 KB, application/x-zip-compressed)
2012-05-07 23:09 UTC, Khaled El Mansoury
Details

Description Sumana Harihareswara 2012-03-11 03:12:35 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.
Comment 1 Krinkle 2012-03-11 03:15:05 UTC
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.
Comment 2 Sam Reed (reedy) 2012-03-11 03:19:14 UTC
Im sure i had seen it on labs or mw.org someone (MaxSem?) had put windows instructions...
Comment 3 Sam Reed (reedy) 2012-03-11 03:19:55 UTC
Im sure i had seen it on labs or mw.org someone (MaxSem?) had put windows instructions...
Comment 4 Liangent 2012-03-11 14:23:57 UTC
(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
Comment 5 Antoine "hashar" Musso (WMF) 2012-03-12 09:10:21 UTC
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.
Comment 6 Max Semenik 2012-03-12 09:19:10 UTC
SInce there's no such thing as packages in Windows, I assume it's a WONTFIX?
Comment 7 Sumana Harihareswara 2012-03-12 16:24:17 UTC
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.
Comment 8 Sumana Harihareswara 2012-03-15 01:42:51 UTC
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.
Comment 9 Aaron Schulz 2012-03-17 00:14:45 UTC
Currently the hook commit-msg does not install so the gerrit windows instructions are totally broken.
Comment 10 Sumana Harihareswara 2012-03-19 21:22:09 UTC
Aaron fixed the instructions at http://www.mediawiki.org/wiki/Git/Workflow so I think people will be able to install ok on Windows.
Comment 11 Siddhartha Ghai 2012-03-23 07:21:28 UTC
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.
Comment 12 Sumana Harihareswara 2012-03-23 13:40:59 UTC
Reopening as a desired enhancement.
Comment 13 Jarry1250 2012-03-28 19:33:12 UTC
(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?
Comment 14 Sam Reed (reedy) 2012-03-28 23:18:40 UTC
(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
Comment 15 Siddhartha Ghai 2012-03-29 23:07:08 UTC
(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).
Comment 16 Jarry1250 2012-03-30 09:11:12 UTC
> 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?
Comment 17 Raimond Spekking 2012-03-30 09:36:15 UTC
(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
Comment 18 Jarry1250 2012-03-30 09:48:13 UTC
(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.
Comment 19 Raimond Spekking 2012-03-30 10:21:46 UTC
(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 :-(
Comment 20 Khaled El Mansoury 2012-04-24 01:17:22 UTC
(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?
Comment 21 Siddhartha Ghai 2012-04-24 01:28:25 UTC
(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.
Comment 22 Chad H. 2012-04-24 01:31:26 UTC
(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.
Comment 23 Jarry1250 2012-04-24 08:39:02 UTC
> 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.
Comment 24 Khaled El Mansoury 2012-04-29 20:23:53 UTC
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.
Comment 25 Aaron Schulz 2012-04-29 20:25:42 UTC
(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.
Comment 26 Aaron Schulz 2012-04-29 20:29:10 UTC
Also, it would be nice to see any source code.
Comment 27 Khaled El Mansoury 2012-04-29 20:38:19 UTC
(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.
Comment 28 Khaled El Mansoury 2012-04-30 18:11:20 UTC
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.
Comment 29 Max Semenik 2012-05-01 21:11:14 UTC
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.
Comment 30 Khaled El Mansoury 2012-05-02 10:45:31 UTC
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.
Comment 31 Sam Reed (reedy) 2012-05-02 12:34:25 UTC
Do we really need separate x64 and x86 versions?
Comment 32 Khaled El Mansoury 2012-05-02 12:55:23 UTC
(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.
Comment 33 Khaled El Mansoury 2012-05-02 16:22:28 UTC
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.
Comment 34 Sam Reed (reedy) 2012-05-02 16:47:44 UTC
(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
Comment 35 Max Semenik 2012-05-02 19:12:13 UTC
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'.
Comment 36 Khaled El Mansoury 2012-05-02 19:18:54 UTC
(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.
Comment 37 Khaled El Mansoury 2012-05-03 12:40:57 UTC
(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.
Comment 38 Khaled El Mansoury 2012-05-04 20:08:13 UTC
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).
Comment 39 Siddhartha Ghai 2012-05-06 19:14:36 UTC
@ 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.
Comment 40 Khaled El Mansoury 2012-05-07 23:09:55 UTC
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.
Comment 41 Khaled El Mansoury 2012-05-13 11:56:27 UTC
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?
Comment 42 Shantanoo 2012-06-02 09:15:04 UTC
(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
Comment 43 Quim Gil 2013-03-05 23:22:08 UTC
We have instructions to install git-review on Windows at

http://www.mediawiki.org/wiki/Gerrit/git-review#Windows

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links