Sharing changes in the source code

  • emcPT
  • emcPT's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
29 Dec 2013 16:36 #42141 by emcPT
Sharing changes in the source code was created by emcPT
Hello.

I never used git except to download the source code. I do not know how to share the changes that I did. I believe that I must use git push, but at the same time I suspect I do not have permissions to do that, so my question is how to upload the changes that I did so that they will be checked and accepted?

Changes objective:
Add the possibility to the user, using the .ini file, to change how linuxcnc uses the tool orientation: linuxcnc standard (that is used since implementation) or Fanuc standard (that is used by standard in all other controls). Basically the tool tip directions, that can be found here:
linuxcnc.org/docs/html/lathe/lathe-user.html
are swapped for positions 2-3; 8-6; 4-1

The changes were made on:
tool_parse.cc, tool_parse.hh, ioControl_v2.cc, ioControl.cc, driver.cc

How the user can use the feature:
Simply add to the EMCIO section of the .ini file a line containing:
FANUC_TOOLTIP_ORIENTATION = 1

It does not changes the behavior, if the previous line is not added, so it should be safe for all those that do not want to use the feature.

I also take the chance to ask, what GUI you people use to open the source code and browse though the code (like visual studio on windows)?
I made the changes only using VIM, and it is quite hard to browse in the code this way.

Please Log in or Create an account to join the conversation.

More
29 Dec 2013 17:25 #42143 by cmorley
Replied by cmorley on topic Sharing changes in the source code
Here is linuxcnc's new docs on development with git:
linuxcnc.org/docs/2.5/html/code/Contributing-to-LinuxCNC.html
heres the old one with some small examples:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Git
It's pretty technical for a newbee and doesn't tell you about using git it's self (though it mentions tutorials)

Roughly:
When you are happy with your editing of files:
you must commit your changes (git commit <file path>) to your branch of all the pertinent files (This only changes YOUR repository)
when you are happy with all your commits and want to share you have a couple options

If it's relatively small make a patch file. see here for an idea of that:
ariejan.net/2009/10/26/how-to-create-and...ly-a-patch-with-git/
since you don't have push rights to linuxcnc and are probably editing master branch:
first check if the branch you are using is in fact master, in a terminal in the linuxcnc repository folder type
git branch
That will probably say master (the one with an asterisk)
if so then the command to build a patch would be:
git format-patch origin/master --stdout > my_patch_name.patch
that command compares your branch to linuxcnc's branch (origin/master) and makes a patch of the different commits.
You want to make sure you master branch is current with git pull --rebase first.
which pulls in all the new stuff from origin/linuxcnc and puts your new stuff on top of that.

You could then mail that patch file

If it's large then pushing to a public repository and asking people to pull is the norm.
eg github


Next get on emc dev maillist.
plead your case there.
often you will get little response - if people don't feel qualified about the changes they tend not to answer.
unfortunately we do not have a formal way to consider patches.

There is a lot I left out, but I'm not sure what exactly you need to know..

Chris M

Please Log in or Create an account to join the conversation.

  • emcPT
  • emcPT's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
29 Dec 2013 20:09 #42150 by emcPT
Replied by emcPT on topic Sharing changes in the source code
I post the patch here.
I hope it is done correctly. If I did something wrong please let me know.

to use the feature, on the EMCIO of the ini file, place:
FANUC_TOOLTIP_ORIENTATION = 1
Attachments:

Please Log in or Create an account to join the conversation.

More
30 Dec 2013 21:34 #42198 by andypugh
Replied by andypugh on topic Sharing changes in the source code

what GUI you people use to open the source code and browse though the code

I use Eclipse.
www.eclipse.org
The C / C++ version with the Python plugin seems to cover most of LinuxCNC.

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum