Wireshark mailing list archives

Re: Submit code .... from Windows OS


From: Graham Bloice <graham.bloice () trihedral com>
Date: Mon, 5 Mar 2018 18:39:08 +0000

On 5 March 2018 at 18:06, <david_aggeler () hispeed ch> wrote:





How difficult can life be? Or my super bumpy road to a check-in, which
caused a lot of frustration on the way. This is intended for possible
improvements of the developer guides. Sometimes it helps to get feedback
from someone with little perception and little previous knowledge on the
topics. In that sense, less distributed documentation would have help me a
little.



Yes I jumped between three environments, Cygwin, regular windows console,
powershell, and git extension GUIs. Only that way I made micro steps in
understanding of how things are glued together.



After the fact



   - Mention early on also in the win32 guide, that if one plans to
   submit one shall start differently.
   - If ‘SubmittingPatches’ would cover win32/gitextension that probably
   would have been the most effective way.
   This needs to be read early on as well



Regards

David



===



I’ve read many items, and after the fact probably in the wrong order.



https://www.wireshark.org/docs/wsdg_html_chunked/ChSetupWin32.html

https://www.wireshark.org/develop.html

https://www.wireshark.org/docs/wsdg_html_chunked/
ChSrcContribute.html#ChSrcSend

https://www.wireshark.org/docs/wsdg_html_chunked/ChSrcObtain.html#ChSrcGit

https://wiki.wireshark.org/Development/SubmittingPatches

http://git-extensions-documentation.readthedocs.io/
en/latest/remote_feature.html

https://makandracards.com/makandra/1303-how-to-use-git-
on-windows-with-putty

https://stackoverflow.com/questions/34261492/how-to-
push-for-gerrit-review-via-git-extension



My path:



   - Git a git clone, modified code and tested it. So far so good.



   - I now have two IDs registered with wireshark’s gerrit.
   - Uploaded two different SSH keys to code.wireshark.org, because the
   Cygwin ssh is not used by Git Extensions
   - Cygwin: managed to do a git clone
   - CMD Console: Failed to ‘git clone’ from an ssh repository. Finally
   figured, that I need *GIT_SSH* as environment variable
   - CMD Console: First start of ‘git clone’ one cannot confirm ‘y’ to
   actually cache the key (plink text is redirected to git
   - Cached remote key using putty.exe (of course is not installed with
   Git Extensions)
   - CMD Console: Managed to perform a new git clone ssh://
   username () code wireshark org:29418/wireshark
   <http://username () code wireshark org:29418/wireshark>
   - Git Extensions: Modified Remote Repository to use ssh://
   username () code wireshark org:29418/wireshark
   <http://username () code wireshark org:29418/wireshark>
   - Git Extensions: Got a code review error on my Publish Gerrit change
   due to a mismatch in email address
   - Tried to register new email, got ‘Code -Review error Invalid Token’ on
   eMail confirmation link, work around that one. Tried about all browsers.
   - CMD Console: Did a branch & copied modified code into it.
   - Git Extensions: got a ‘missing change-Id in commit message footer‘.
   Commit to refs/*publish*/master/test. Looks wrong.
   - Cygwin: stuck at ‘git review’ with SCP and permission denied
   (publickey). Grr. As this is yet another layer using python, it does not
   find/use plink.exe/pscp. Ok. Back to CMD/GUI
   - Git Extensions: Try a regular push to /refs/for/master : ‘fatal:
   remote part of refspec is not a valid name in
   refs/heads/bug-14415:refs/heads//refs/for/master’
   - Git Extensions:  Push for Gerrit ‘Do you want to add a tracking
   reference’  yes -> still does not work
   - Git Extensions:  Install hook -> still does not work, awkward
   message about amend. Ok lets read more.
   - Git Extensions: commit again with little ‘Amend’ option
   - Finally. Done.
   - Well I thought I was done. I already get the first comments …


I'm sorry you've had such a battle getting your change submitted, but at
least you've built up your experience quota :-)

I agree that the docs could do with some TLC, but I've tried hard not to be
too prescriptive as folks do like to work different ways.

A couple of observations from your list:

   - Don't use Cygwin git. This should be removed from the WSDG.  In fact I
   much prefer folks NOT to have Cygwin on the path AT ALL, it just causes
   issues.  CMake will hunt down the Cygwin items it needs if they're in all
   the standard places, else you can explicitly supply the Cygwin path.
   - Use CMD or PowerShell as your shell.  Other shells at your own risk.
   - You've missed a key wiki page for Windows folks,
   https://wiki.wireshark.org/Development/SubmittingPatches/GitForWindows,
   this leads on to my two next points.
   - Regular Windows Git includes all you need for ssh access as well, I'm
   not sure where PuTTY comes in.  I may be spoilt here because I've used
   PowerShell and PoshGit (https://github.com/dahlbyk/posh-git) for a long
   time and it all just works.
   - As you need Python installed to build, install git-review.  This makes
   life so much easier when working with Gerrit.



-- 
Graham Bloice
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: