Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "ETrice/Development/Repository"

(Create a Patch via Git Gui)
Line 44: Line 44:
 
* right click on "lokale Änderungen"
 
* right click on "lokale Änderungen"
 
* in the contextmenu select "Patch erstellen"
 
* in the contextmenu select "Patch erstellen"
 +
 +
== Apply a Patch ==
 +
 +
We assume the patch was created as described above.
 +
 +
* in the context menu of the Package Explorer go to Team > Apply patch...
 +
* in the wizard select File and locate the patch file
 +
* select 'Apply the patch to the workspace root'
 +
* set leading path segments to 2
 +
* check the result and Finish
  
 
== Checkout a previous revision ==
 
== Checkout a previous revision ==

Revision as of 05:11, 6 October 2011

Git and eTrice

For eTrice we are using the Git-Repository from eclipse. For those people, who are not so familiar with Git, this chapter will give a step by step introduction.

Git in general and Git at Eclipse

After installation of EGit in Eclipse, you can look up "Git for Eclipse Users" in the EGit Documentation.

Installations on your computer


Clone eTrice Repository

Configuration

IMPORTANT: execute in shell or git shell:

  • git config --global user.email <your email address>
  • git config --global user.name "<your user name>"

pull/push (only for committers)

  • ssh: git clone ssh://<dein commiter name>@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git
  • https: git clone https://<dein commiter name>@git.eclipse.org/gitroot/etrice/org.eclipse.etrice.git

only pull

Use EGit

  • create empty workspace
  • open view "Git Repositories" or perspective "Git Repository Exploring"
  • add repository path of your local git repository you cloned before
  • contextmenu on repository: "Import Projects..."
  • Next >
  • Select All + Finish

Create a Patch via Git Gui

  • open the Git Gui from your windows menu
  • open your "local Git Repositoriy"
  • from the main menu select "Projektarchiv" => "Historie von >>master<< darstellen"
  • in the new window the latest master version must be selected (blue)
  • right click on "lokale Änderungen"
  • in the contextmenu select "Patch erstellen"

Apply a Patch

We assume the patch was created as described above.

  • in the context menu of the Package Explorer go to Team > Apply patch...
  • in the wizard select File and locate the patch file
  • select 'Apply the patch to the workspace root'
  • set leading path segments to 2
  • check the result and Finish

Checkout a previous revision

Inspect the log and determine the commit id you want to change to. Then git checkout this:

 $ git checkout 2eb90f4643fd425f77de2b88753a86416cda0166
 Note: checking out '2eb90f4643fd425f77de2b88753a86416cda0166'.
 
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 2eb90f4... ui.structure: during creation take position as midpoint of new interface item. Adjusted PopulateDiagramCommand accordingly.

working with branches

creating a local branch

pushing a local branch

creating a remote tracking branch

pulling for remote tracking branches

If you often merge with the same branch, you may want to use something like the following in your configuration file:

   [branch "before_indigo"]
   remote = <nickname>
   merge = <remote-ref>
   [remote "<nickname>"]
   url = <url>
   fetch = <refspec>

With EGit the configuration can be accesses from the Git Repositories View context menu > Open Properties View The Properties View displays the current configuration and offers an Edit button in the upper left corner.

Here is an example of a pull configuration for a remote tracking branch:
GitConfig.jpg

Using the eTrice github clone

According to https://bugs.eclipse.org/bugs/show_bug.cgi?id=332970 Eclipse projects with git repositories (and correct metadata set) are mirrored to github.

And so is eTrice: https://github.com/eclipse/etrice

Here are some slides explaining how github is accessed using EGit: http://www.slideshare.net/loianeg/using-the-egit-eclipse-plugin-with-git-hub-2578587

Any github user can fork an existing github repository. This facilitates collaborating with contributors which have no commit rights.

See also the Wiki page on Git contributions.

TODO: typical workflow...

Some hints to create Documentation

Location of Documentation

- ETrice Documentation will be put to org.eclipse.etrice.doc

- numbering of chapters is 000-xxx, 005-yyy, 010-zzz, 015... to have room for inject some chapters

- images (put to the folder images) should have the same numbering according to the chapters

- within the etrice-index.txt document the ordering of the chapters will be done. This file will be used from the build prozess to collect all single .textile files to produce the complete Doku.

- build prozess will be started from the external tool menu => "build-etrice-doc". (you must have internet access during production of the docu)


Within the .textile file

- with F1 you can get a list of the formating strings

- some formating options does not work well for all document types e.g. __italic__ does not work in the pdf file if the string contains "_". => therefore, for names which reference a concrete model name (shown in a picture or code block) use: "??This_is_my_name??" == citation

Images

- use IrfanView to create screen shots (everything on board what you need)

- use the png format to save pictures (i had never problems with that)

- pictures should not be larger than 640*480 pixels. Otherwise they will cause problems in the PDF file. IrfanView: Ctrl+r => resize image

- to sharpen the images, use IrfanView: Image=>sharpen to create perfect screen shots.

Steps to change to Indigo

  • download and install eclipse Modeling for Win32

"http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/R/eclipse-modeling-indigo-win32.zip"

  • install Xtext from

http://www.eclipse.org/Xtext/download/ (drag and drop the install icon to your eclipse toolbar)

  • install Egit, Subversive and Graphiti via the update site from indogo

http://download.eclipse.org/releases/indigo (for Subversive use the Connector Native JavaHL 1.6.12)

  • download the target configuration "target-indigo-2011-06-29" from ftp.protos.de and copy it to your target path. To get the credits for the protos ftp server, please contact ts@protos.de.
  • in preferences=>Run/Debug=>String Substitution make sure that the variable "eTriceTargetInstallationPath" is set to your target path. (create the variable if not existing)
  • in the preferences=>plug in development=>target configuration, make sure that the "eTrice development" target is selected
  • sometimes it is necessary to update the plug in list (IOExtensions cannot be resolved)

=> windows=>preferences=>pulg in development=> target configuration (select the "running configuration" and apply it, select the "eTrice development" target again and apply it) (if somebody knows a smarter way to update the plug in list, please change this wiki)

Back to the top