mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028347: Reuse OCCT implementation for producing end-user documentation for Products
Updated destination directory for generated by gendoc proc pdf files. Added additional option "-update_images_size" for gendoc procedure to update width of images in *.md files during pdf generation for @figure alias. Documentation was updated to use alias @figure instead of outdated @image Added support of svg image format in procedure OCCDoc_UpdateImagesSize. Added generation of overview for product components. Added generation of products refman/chm for each component.
This commit is contained in:
@@ -124,8 +124,7 @@ The official repository contains:
|
||||
|
||||
TortoiseGit integrates into Windows Explorer, thus it is possible to use context menu in Windows Explorer to access its functionality:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image005.png
|
||||
@image latex OCCT_GitGuide_V2_image005.png
|
||||
@figure{OCCT_GitGuide_V2_image005.png}
|
||||
|
||||
|
||||
|
||||
@@ -138,8 +137,7 @@ The official repository contains:
|
||||
|
||||
Select Git->Config to add your user name and Email address to the local <i>.gitconfig</i> file
|
||||
|
||||
@image html OCCT_GitGuide_V2_image006.png
|
||||
@image latex OCCT_GitGuide_V2_image006.png
|
||||
@figure{OCCT_GitGuide_V2_image006.png}
|
||||
|
||||
@subsection occt_gitguide_2_2 Linux platform
|
||||
|
||||
@@ -190,8 +188,7 @@ The official repository contains:
|
||||
To generate the key with this client, run **Puttygen** (e.g. from Start menu -> TortoiseGit -> Puttygen),
|
||||
then click **Generate** and move mouse cursor over the blank area until the key is generated.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image007.png "Putty key generator"
|
||||
@image latex OCCT_GitGuide_V2_image007.png "Putty key generator"
|
||||
@figure{OCCT_GitGuide_V2_image007.png, "Putty key generator"}
|
||||
|
||||
After the key is generated, you will see GUI controls to define the public key comment
|
||||
and / or specify the password for the private key protection.
|
||||
@@ -295,8 +292,7 @@ Click **Save** to input the key to the system.
|
||||
|
||||
* In TortoiseGit: create a new folder, open it and right-click in the Explorer window, then choose **Git Clone** in the context menu:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image009.png
|
||||
@image latex OCCT_GitGuide_V2_image009.png
|
||||
@figure{OCCT_GitGuide_V2_image009.png}
|
||||
|
||||
If you have chosen Putty as SSH client during TortoiseGit installation, check the **Load Putty Key** option and specify the location of the private key file saved by PuttyGen (see 3.2.1). This shall be done for the first time only.
|
||||
|
||||
@@ -321,8 +317,7 @@ In TortoiseGit:
|
||||
* Right-click in the Explorer window, then choose **Git Create Branch**.
|
||||
* Select **Base On** Branch *remotes/origin/master*.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image012.png
|
||||
@image latex OCCT_GitGuide_V2_image012.png
|
||||
@figure{OCCT_GitGuide_V2_image012.png}
|
||||
|
||||
Check option **Switch to new branch** if you are going to start working with the newly created branch immediately.
|
||||
|
||||
@@ -337,8 +332,7 @@ In TortoiseGit:
|
||||
|
||||
In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Switch/Checkout**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image013.png
|
||||
@image latex OCCT_GitGuide_V2_image013.png
|
||||
@figure{OCCT_GitGuide_V2_image013.png}
|
||||
|
||||
Note that in order to work with the branch locally you need to set option
|
||||
**Create new branch** when you checkout the branch from the remote repository for the first time.
|
||||
@@ -372,8 +366,7 @@ In TortoiseGit:
|
||||
|
||||
* In TortoiseGit: right-click in the explorer window and select in the context menu <b>Git Commit -> CR…</b>:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image014.png
|
||||
@image latex OCCT_GitGuide_V2_image014.png
|
||||
@figure{OCCT_GitGuide_V2_image014.png}
|
||||
|
||||
Unstaged files will be shown if you check the option ‘Show Unversioned Files’.
|
||||
Double-click on each modified file to see the changes to be committed (as a difference vs. the base version).
|
||||
@@ -391,15 +384,13 @@ In TortoiseGit:
|
||||
|
||||
* In TortoiseGit: right-click in the explorer window and select in the context menu, TortoiseGit -> **Push**
|
||||
|
||||
@image html OCCT_GitGuide_V2_image015.png
|
||||
@image latex OCCT_GitGuide_V2_image015.png
|
||||
@figure{OCCT_GitGuide_V2_image015.png}
|
||||
|
||||
Note that Git forbids pushing a branch if the corresponding remote branch already exists and has some changes, which are not in the history of your local branch. This may happen in different situations:
|
||||
* You have amended the last commit which is already in the remote repository. If you are sure that nobody else uses your branch, push again with **Force** option.
|
||||
* You have rebased your branch, so that now it is completely different from the branch in the remote repository. In this case, push it under a different name (add a suffix):
|
||||
|
||||
@image html OCCT_GitGuide_V2_image016.png
|
||||
@image latex OCCT_GitGuide_V2_image016.png
|
||||
@figure{OCCT_GitGuide_V2_image016.png}
|
||||
|
||||
Then remove the original remote branch so that other people recognize that it has been replaced by the new one. For that, select TortoiseGit -> **Push** again, select an empty line for your local branch name,
|
||||
and enter the name of the branch to be removed in **Remote** field:
|
||||
@@ -419,8 +410,7 @@ Note that Git forbids pushing a branch if the corresponding remote branch alread
|
||||
|
||||
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Fetch**. Check in **Prune** check-box.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image018.png
|
||||
@image latex OCCT_GitGuide_V2_image018.png
|
||||
@figure{OCCT_GitGuide_V2_image018.png}
|
||||
|
||||
If the branch you are working with has been changed in the remote repository, use Git command *pull* to get the remote changes and merge them with your local branch.
|
||||
|
||||
@@ -433,8 +423,7 @@ Note that Git forbids pushing a branch if the corresponding remote branch alread
|
||||
|
||||
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Pull**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image019.png
|
||||
@image latex OCCT_GitGuide_V2_image019.png
|
||||
@figure{OCCT_GitGuide_V2_image019.png}
|
||||
|
||||
Note that the local branches of your repository are the primary place, where your changes are stored until they get integrated to the official version of OCCT (master branch). The branches submitted to official repository are for collaborative work, review, and integration -- that repository should not be used for long-term storage of incomplete changes.
|
||||
|
||||
@@ -447,8 +436,7 @@ Remove the local branches that you do not need any more. Note that you cannot de
|
||||
|
||||
* In TortoiseGit: right-click in the explorer window and select in the context menu **TortoiseGit** -> **Git Show Log**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image020.png
|
||||
@image latex OCCT_GitGuide_V2_image020.png
|
||||
@figure{OCCT_GitGuide_V2_image020.png}
|
||||
|
||||
Select **All branches** check-box to view all branches.
|
||||
Right-click on the branch you want to delete and select **Delete** item in the context menu.
|
||||
@@ -462,15 +450,13 @@ If you have a fix made on a previous version of OCCT, perform the following sequ
|
||||
* Find a tag or a commit corresponding to this version in the Git history log of the master branch.
|
||||
* Create a branch basing on this tag or commit. In TortoiseGit history log: right-click on the base commit, then select **Create branch at this version**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image021.png
|
||||
@image latex OCCT_GitGuide_V2_image021.png
|
||||
@figure{OCCT_GitGuide_V2_image021.png}
|
||||
|
||||
* Check option **Switch to the new branch** to start working within the new branch immediately, or switch to it separately afterwards.
|
||||
* Put your fix in the working copy, build and check that it works, then commit to the branch.
|
||||
* Rebase the branch on the current master. In TortoiseGit: right-click on the working directory, choose **TortoiseGit** -> **Rebase**, select *remotes/origin/master* as UpStream revision, and click **Start**:
|
||||
|
||||
@image html OCCT_GitGuide_V2_image022.png
|
||||
@image latex OCCT_GitGuide_V2_image022.png
|
||||
@figure{OCCT_GitGuide_V2_image022.png}
|
||||
|
||||
Note that you can get some conflicts during rebase. To resolve them, double-click on each conflicted file (highlighted by red in the file list) to open visual merge tool. Switch between conflicting fragments by red arrows, and for each one decide if the code of one or both conflicting versions is to be taken.
|
||||
|
||||
@@ -487,19 +473,16 @@ To rebase your branch into a single commit, you need to do the following:
|
||||
* In TortoiseGit history log, select a branch to rebase on <i>(remotes/origin/master)</i> and in the context menu choose **Rebase “CR12345” onto this**.
|
||||
* In the **Rebase** dialog, check **Squash All**. You can also change the order of commits and define for each commit whether it should be kept (**Pick**), edited, or just skipped.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image023.png
|
||||
@image latex OCCT_GitGuide_V2_image023.png
|
||||
@figure{OCCT_GitGuide_V2_image023.png}
|
||||
|
||||
* Click **Start**.
|
||||
* The process will stop if a conflict is detected. In that case, find files with status **Conflicted** in the list (marked by red), and double-click on them to resolve the conflict. When all conflicts are resolved, click **Continue**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image024.png
|
||||
@image latex OCCT_GitGuide_V2_image024.png
|
||||
@figure{OCCT_GitGuide_V2_image024.png}
|
||||
|
||||
* At the end of the process, edit the final commit message (it should start from the issue ID and a description from Mantis in the first line, followed by a summary of actual changes), and click **Commit**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image025.png
|
||||
@image latex OCCT_GitGuide_V2_image025.png
|
||||
@figure{OCCT_GitGuide_V2_image025.png}
|
||||
|
||||
@section occt_gitguide_5 Work with repository: Reviewer operations
|
||||
|
||||
@@ -525,6 +508,5 @@ To rebase your branch into a single commit, you need to do the following:
|
||||
* To review commits one-by-one, select each commit in the log. The list of changed files is shown at the bottom of the window; double-click on the file will open visual compare tool.
|
||||
* To review all changes made in the branch at once, or to compare two arbitrary revisions, select the corresponding commits in the log (e.g. the last commit in the branch and the branching point), ight-click for the context menu, and choose **Compare revisions**.
|
||||
|
||||
@image html OCCT_GitGuide_V2_image026.png
|
||||
@image latex OCCT_GitGuide_V2_image026.png
|
||||
@figure{OCCT_GitGuide_V2_image026.png}
|
||||
|
||||
|
Reference in New Issue
Block a user