FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


sourcecode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sourcecode [2019/01/11 19:18]
jfduval [Ressources]
sourcecode [2020/03/25 13:51] (current)
jfduval [Cloning a repository and its submodule(s) - latest version of a branch]
Line 22: Line 22:
 <​code>​git clone --recursive -b dev https://​github.com/​DephyInc/​fx-rigid-mn.git</​code>​ <​code>​git clone --recursive -b dev https://​github.com/​DephyInc/​fx-rigid-mn.git</​code>​
  
-When you do that, you get the submodule version that was committed with the main project. As an example, flexsea-comm will be at version 46874a2. This might not be the latest, but its what was committed. Unless the developer made a mistake while committing or pushing the code, this project should compile and work with no tweaking necessary. ​Because is worth a thousand words, lets explore a typical situation. Our simplified system has two main projects (fx-rigid-mn and fx-rigid-ex) and two submodules (flexsea-comm and flexsea-projects).+When you do that, you get the submodule version that was committed with the main project. As an example, flexsea-comm will be at version 46874a2. This might not be the latest, but its what was committed. Unless the developer made a mistake while committing or pushing the code, this project should compile and work with no tweaking necessary. ​Let'​s ​explore a typical situation. Our simplified system has two main projects (fx-rigid-mn and fx-rigid-ex) and two submodules (flexsea-comm and flexsea-projects).
  
 Each rectangle is a commit, with its number written in the box. The text in the commit message. Time is on the vertical axis: lower is more recent. To simplify the story, we will assume that a single developer is doing all the changes. The letters track the commits in time. Each rectangle is a commit, with its number written in the box. The text in the commit message. Time is on the vertical axis: lower is more recent. To simplify the story, we will assume that a single developer is doing all the changes. The letters track the commits in time.
Line 29: Line 29:
  
 **A)** At the starting point, all four projects are at commit #1 (with their heads pointing to commit #1), and everything works. This hypothetical system has -mn and -ex communicating using 24-byte packets, and a state machine living in -projects goes through different impedance coefficients and setpoints. **A)** At the starting point, all four projects are at commit #1 (with their heads pointing to commit #1), and everything works. This hypothetical system has -mn and -ex communicating using 24-byte packets, and a state machine living in -projects goes through different impedance coefficients and setpoints.
-  * To get this code you can do git clone --recursive -b branchName repoAddress.+  * To get this code you can do ''​git clone --recursive -b branchName repoAddress''​.
   * Pulling the submodules to their heads would not change things, as the heads are pointing to #1.   * Pulling the submodules to their heads would not change things, as the heads are pointing to #1.
 **B)** A bug is found in flexsea-comm. A correction is made, and the code is committed (flexsea-comm #2). **B)** A bug is found in flexsea-comm. A correction is made, and the code is committed (flexsea-comm #2).
   * As no main projects point to this commit, this code doesn'​t affect the demo. It's an intermediate state.   * As no main projects point to this commit, this code doesn'​t affect the demo. It's an intermediate state.
 **C)** Oh, turns out we need bigger packets! We are now using 48-byte packets (flexsea-user commit #3) **C)** Oh, turns out we need bigger packets! We are now using 48-byte packets (flexsea-user commit #3)
 +
 **D)** We update fx-rigid-mn to use the latest version of flexsea-comm (#3). flexsea-projects didn't change, we keep using commit #1. (fx-rigid-mn commit #2) **D)** We update fx-rigid-mn to use the latest version of flexsea-comm (#3). flexsea-projects didn't change, we keep using commit #1. (fx-rigid-mn commit #2)
 +
   * While this code compiles, it will break your demo: fx-rigid-ex is still using 24-byte packets. ​   * While this code compiles, it will break your demo: fx-rigid-ex is still using 24-byte packets. ​
 **E)** Eventually fx-rigid-ex will be updated to the newest submodules, and the demo will be fixed. **E)** Eventually fx-rigid-ex will be updated to the newest submodules, and the demo will be fixed.
sourcecode.1547234306.txt.gz ยท Last modified: 2019/01/11 19:18 by jfduval