|
@@ -1,20 +1,16 @@
|
|
|
= jMonkeyEngine SDK: Version Control
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
-:revdate: 2016/03/17 20:48
|
|
|
+:revnumber:2.0
|
|
|
+:revdate: 2020/07/09
|
|
|
:keywords: documentation, sdk, editor, tool
|
|
|
-:relfileprefix: ../
|
|
|
-:imagesdir: ..
|
|
|
-ifdef::env-github,env-browser[:outfilesuffix: .adoc]
|
|
|
|
|
|
|
|
|
Whether you work in a development team or alone: File versioning is a handy method to keep your code consistent, compare files line-by-line, and even roll back unwanted changes. This documentation shows you how to make the most of the SDK's integrated version control features for Subversion, Mercurial, and Git.
|
|
|
|
|
|
For every team member, the file versioning workflow is as follows:
|
|
|
|
|
|
-. Once: Download a working copy of the project from the repository (“checkout).
|
|
|
-. Regularly: Upload your own changes to the repository (“commit).
|
|
|
-. Regularly: Download updates by others from the repository (“update).
|
|
|
+. Once: Download a working copy of the project from the repository ("`checkout`").
|
|
|
+. Regularly: Upload your own changes to the repository ("`commit`").
|
|
|
+. Regularly: Download updates by others from the repository ("`update`").
|
|
|
|
|
|
include::partial$sdk-features-tip.adoc[]
|
|
|
|
|
@@ -40,7 +36,7 @@ Requirements:
|
|
|
|
|
|
Now you create a repository to store your project's files.
|
|
|
|
|
|
-. In the jMonkeyEngine SDK, right-click the project in the Projects window and choose Versioning > Import Into Subversion Repository (or initialize Mercurial Project, etc, respectively).
|
|
|
+. In the jMonkeyEngine SDK, btn:[RMB] click the project in the "`Projects`" window and choose menu:Versioning[Import Into Subversion Repository] (or initialize Mercurial Project, etc, respectively).
|
|
|
** Tip: If you haven't evaluated yet which system to choose, start with Subversion for now.
|
|
|
|
|
|
. Go through the wizard and fill in the fields to set up the repository.
|
|
@@ -50,14 +46,14 @@ Now you create a repository to store your project's files.
|
|
|
|
|
|
You and your team mates check out (download) the repository to their individual workstations.
|
|
|
|
|
|
-. Go to the Team menu and choose Subversion > Checkout (or Git or Mercurial respectively)
|
|
|
+. Go to the "`Team`" menu and choose menu:Subversion[Checkout] (or Git or Mercurial respectively)
|
|
|
. Fill in your repo data into the wizard and click Finish.
|
|
|
//** A typical repository +++<abbr title="Uniform Resource Locator">URL</abbr>+++ looks like this example: `link:http://jmonkeyengine.googlecode.com/svn/trunk/engine[http://jmonkeyengine.googlecode.com/svn/trunk/engine]`
|
|
|
** If you want to be able to submit changes, you must have a username and password to this repository. Otherwise leave these fields blank.
|
|
|
|
|
|
. The repository is downloaded and stored in the location you chose.
|
|
|
-. Use the File > Open Project menu to open the checkout as project and start working.
|
|
|
-** If the checkout is not recognized you need to choose File > New Project from Existing Sources
|
|
|
+. Use the menu:File[Open Project] menu to open the checkout as project and start working.
|
|
|
+** If the checkout is not recognized you need to choose menu:File[New Project from Existing Sources]
|
|
|
|
|
|
|
|
|
Of course you can also check out existing repositories and access code from other open-source projects (e.g. SourceForge, GoogleCode, dev.java.net).
|
|
@@ -67,43 +63,43 @@ Of course you can also check out existing repositories and access code from othe
|
|
|
|
|
|
Receiving the latest changes from the team's repository is referred to as `updating`. Sending your changes to the team's repository is refered to as `commiting`.
|
|
|
|
|
|
-. Before making changes, right-click the project and select Subversion > Update to make sure you have the latest revision.
|
|
|
+. Before making changes, btn:[RMB] click the project and select menu:Subversion[Update] to make sure you have the latest revision.
|
|
|
** Get in the habit of updating regularly, always before you edit a version controlled file. It will spare you much grief.
|
|
|
|
|
|
. After making changes to the project, make certain your change did not break anything.
|
|
|
.. Update, build, run, test.
|
|
|
.. Look at the red/green/blue marks in the editor to review what you have deleted/added/changed. Click the marks to review all differences in a file.
|
|
|
-.. Choose Subversion > Show Changes to see all files that were recently changed – by you and other team members.
|
|
|
+.. Choose menu:Subversion[Show Changes] to see all files that were recently changed – by you and other team members.
|
|
|
.. _Update again_ in case your team mates made changes while you were reviewing.
|
|
|
|
|
|
-. If there are no conflicts and you want to commit your changes, choose Subversion > Commit from the menu.
|
|
|
+. If there are no conflicts and you want to commit your changes, choose menu:Subversion[Commit] from the menu.
|
|
|
. Write a commit message describing what you changed.
|
|
|
-** Remember, you are writing “a message to your future self. Never write redundant stuff like “I changed something.
|
|
|
+** Remember, you are writing a message to your future self. Never write redundant stuff like "`I changed something`".
|
|
|
|
|
|
|
|
|
|
|
|
== Comparing and Reverting Changes
|
|
|
|
|
|
* If you and another committer edited the same line, there is a conflict, and the jMonkeyEngine SDK will show an error message.
|
|
|
-** Right-click a file Choose Subversion > Resolve Conflict
|
|
|
+** btn:[RMB] click a file Choose menu:Subversion[Resolve Conflict]
|
|
|
... Compare the conflicting versions. Press the buttons to accept or reject each change individually.
|
|
|
... After the resolver shows green, save the resolution.
|
|
|
... Build and test the resolution, update, and commit.
|
|
|
|
|
|
|
|
|
-* Right-click a file and choose Subversion > Search History.
|
|
|
+* btn:[RMB] click a file and choose menu:Subversion[Search History].
|
|
|
** You can inspect a file's history and see who changed what, why, and when.
|
|
|
** You can roll back a file to a historic version if necessary.
|
|
|
|
|
|
-* In general, you can choose Subversion > Diff for any file to see two versions of a file next to each other.
|
|
|
+* In general, you can choose menu:Subversion[Diff] for any file to see two versions of a file next to each other.
|
|
|
|
|
|
|
|
|
== No Version Control? Local History!
|
|
|
|
|
|
If you do not use any version control, you can still track changes in projects to a certain degree.
|
|
|
|
|
|
-* Right-click a file or directory and choose Local History to show or revert changes, or undelete files.
|
|
|
-* You can also select any two files in the Project window and choose Tools > Diff to compare them.
|
|
|
+* btn:[RMB] click a file or directory and choose Local History to show or revert changes, or undelete files.
|
|
|
+* You can also select any two files in the Project window and choose menu:Tools[Diff] to compare them.
|
|
|
* Local History only works for files edited in jMonkeyEngine SDK Projects (It does not work for other files, e.g. in the Favorites window.)
|
|
|
|
|
|
See also:
|