Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
student:eclipse:subversion [2019/02/17 14:31] – bernstdh | student:eclipse:subversion [2019/03/20 20:08] – bernstdh |
---|
| |
| |
However, before you start note that **it may be difficult to install the SVN Connector on Windows machines running Eclipse Oxygen**. If this is your current environment then you have two options - install Eclipse Neon instead or figure out how to install the connector (which is available from Polarion.com) manually. (Bug report [[ https://bugs.eclipse.org/bugs/show_bug.cgi?id=518033 | 518033 ]] may prove usefule in this regard.) | However, before you start note that **it may be difficult to install the SVN Connector on Windows machines running Eclipse Oxygen**. If this is your current environment then you have two options - install Eclipse Neon instead or figure out how to install the connector (which is available from Polarion.com) manually. (Bug report [[ https://bugs.eclipse.org/bugs/show_bug.cgi?id=518033 | 518033 ]] may prove useful in this regard.) |
| |
| |
| |
| |
=== After the Process has Started === | === After the Process is Completed === |
| |
Regardless of how you start the process, after it is completed you should restart Eclipse. | Regardless of how you start the process, after it is completed you should restart Eclipse. |
| |
- You may now be prompted to install the SVN Connectors in a dialog box. **IF NOT, YOU MUST FORCE THIS PROCESS MANUALLY AS FOLLOWS:** Click on <key>Preferences</key> (which may be under <key>Windows</key> or the main <key>Eclipse</key> menu), expand "Team", and click on "SVN". This should open the dialog box. If not, click on the "SVN Connector" tab, and click on "Get Connectors...". | If you are installing Subclipse, you may be prompted to install the SVN Connectors in a dialog box. **IF NOT AND YOU ARE USING SUBCLIPSE, YOU MUST FORCE THIS PROCESS MANUALLY AS FOLLOWS:** Click on <key>Preferences</key> (which may be under <key>Windows</key> or the main <key>Eclipse</key> menu), expand "Team", and click on "SVN". This should open the dialog box. If not, click on the "SVN Connector" tab, and click on "Get Connectors...". Then: |
- Select an appropriate connector -- SVN Kit can be used on all platforms; Native JavaHL can only be used on Windows machines that have an ''%%ssh%%'' client. So, you should probably use SVN Kit. (Note: ''%%stu%%'' currently supports SVN 1.9.3, so any connector for 1.9.3 or lower should work, but you should probably use the most recent version lower than or equal to 1.9.3.) | - Select an appropriate connector -- SVN Kit can be used on all platforms; Native JavaHL can only be used on Windows machines that have an ''%%ssh%%'' client. So, you should probably use SVN Kit. (Note: ''%%stu%%'' currently supports SVN 1.9.3, so any connector for 1.9.3 or lower should work, but you should probably use the most recent version lower than or equal to 1.9.3.) |
- Click on <key>Finish</key>. | - Click on <key>Finish</key>. |
- When the next dialog appears check "I accept..." and click on <key>Finish</key>. You may get a warning that says you are "installing software that contains unsigned content". You can ignore it and click <key>OK</key>. | - When the next dialog appears check "I accept..." and click on <key>Finish</key>. You may get a warning that says you are "installing software that contains unsigned content". You can ignore it and click <key>OK</key>. |
- Restart Eclipse. | - Restart Eclipse. |
| |
| |
| You can change the SVN interface by clicking on <key>Preferences</key>-<key>Team</key>-<key>SVN</key> and selecting the "SVN interface" from the "Client:" drop-down list. |
| |
==== Connecting to Subversion on stu ==== | ==== Connecting to Subversion on stu ==== |
| |
| === Protocol === |
| |
Some Subversions Repository Servers use ''%%http%%'' (or ''%%https%%'') as the communications protocol. ''%%stu%%'' uses ''%%ssh%%''. | Some Subversions Repository Servers use ''%%http%%'' (or ''%%https%%'') as the communications protocol. ''%%stu%%'' uses ''%%ssh%%''. |
| |
| |
| === Identifying a Repository === |
| |
- Learn the URL for the repository. (It is likely to be something like ''%%svn+ssh://stu.cs.jmu.edu/cs/students/csXXX/SSYY/teamNN %%'' where XXX corresponds to the course number, SS corresponds to the semester [either fa or sp], YY corresponds to the year, and NN corresponds to the team number). **Note:** If you are using a computer (e.g., your personal computer) in which your username is not your JMU eID, you should insert ''%%eID@%%'' between ''%%//%%'' and ''%%stu%%'' (where eID denotes your JMU eID). | - Learn the URL for the repository. (It is likely to be something like ''%%svn+ssh://stu.cs.jmu.edu/cs/students/csXXX/SSYY/teamNN %%'' where XXX corresponds to the course number, SS corresponds to the semester [either fa or sp], YY corresponds to the year, and NN corresponds to the team number). **Note:** If you are using a computer (e.g., your personal computer) in which your username is not your JMU eID, you should insert ''%%eID@%%'' between ''%%//%%'' and ''%%stu%%'' (where eID denotes your JMU eID). |
- If you are not already, use the SVN perspective by clicking on <key>Window</key>-<key>Perspective</key>-<key>Open Perspective</key>-<key>Other</key>, selecting "SVN Repository Exploring", and clicking on <key>OK</key>. | - If you are not already, use the SVN perspective by clicking on <key>Window</key>-<key>Perspective</key>-<key>Open Perspective</key>-<key>Other</key>, selecting "SVN Repository Exploring", and clicking on <key>OK</key>. |
- Click on {{eclipse_new-repository-location.gif}}. | - Click on {{eclipse_new-repository-location.gif}}. |
- After the dialog box opens, enter the URL in the "URL:" field. | - After the dialog box opens, enter the URL in the "URL:" field. |
- Complete the process. | - Complete the process. |
| |
Depending on the particular plugin, you may be given the opportunity to <key>Save authentication</key> information in which case you will not be prompted for it in the future (but you will be asked to create a master Eclipse password if you have not done so already). Alternatively, you can create an [[student:utilities:start:keypairs | SSH Key Pairs ]] to avoid having to repeatedly enter authentication information. In either case, **should not save your authentication information on a "public" machine**. | === Authentication === |
| |
| The plugin will need to authenticate with ''%%stu%%'' every time an operation is performed, and this can be quite inconvenient. There are two ways around this. |
| |
| * You may (it varies with the plugin) be given the opportunity to <key>Save authentication</key> information in which case you will not be prompted for it in the future. In this case, you will be asked to create a master Eclipse password if you have not done so already. |
| |
| * You can create an [[student:utilities:start:keypairs | SSH Key Pair ]] to avoid having to repeatedly enter authentication information. In this case, you will need to tell Eclipse to use your private key by clicking on <key>Preferences</key>-<key>General</key>-<key>Network Connections</key>-<key>SSH2</key> and entering the path and file name on the ''%%General%%'' tab. |
| |
==== Using Subversive ==== | In either case, **should not save your authentication information on a "public" machine**. |
| |
| |
The Subversive plugin enables you to execute SVN commands from within | |
| |
| ==== Using the Plugin ==== |
| |
| |
| The Subversive and Subclipse plugins enable you to execute SVN commands from within |
Eclipse. | Eclipse. |
| |
an * character before it's name in the file tab (there will be no indicator | an * character before it's name in the file tab (there will be no indicator |
in the //Language// Perspective/Package Explorer). | in the //Language// Perspective/Package Explorer). |
| |
| |
=== Check-Out === | |
| |
**Assuming you have already added one or more repository locations to | |
Subversive**, you can check-out a repository for the first time and | |
create a local/working copy in a few ways. One way is to: | |
| |
- If you are not already, use the SVN perspective by clicking on <key>Window</key>-<key>Open Perspective</key>-<key>Other</key>, selecting "SVN Repository Exploring", and clicking on <key>OK</key>. | |
- Expand the appropriate repository. | |
- Right-click on the appropriate project. | |
- Pull down to "Check Out". | |
| |
Another way is to: | |
| |
- Click on <key>File</key>-<key>Import</key>-<key>SVN</key>-<key>Project From SVN</key>. | |
- Select "Use existing repository", select the appropriate repository from the list, and click <key>Next</key>. | |
- Add the project name to the end of the URL (since there may be more than one project in the repository) and click <key>Finish</key>. | |
- Check "Check out as a project with the name specified", fill in the project name, and click <key>Finish</key>. | |
| |
| |
- When the dialog box appears, select the appropriate repository type (i.e., SVN) and click on <key>Next</key>. | - When the dialog box appears, select the appropriate repository type (i.e., SVN) and click on <key>Next</key>. |
- When the next dialog box appears, check "Use existing repository location", select the appropriate location, and click <key>Next</key>. | - When the next dialog box appears, check "Use existing repository location", select the appropriate location, and click <key>Next</key>. |
- Select "Simple Mode". (Note: This will make it harder to create branches but easier to use the trunk.) | - If prompted to choose a mode, select "Simple Mode". (Note: This will make it harder to create branches but easier to use the trunk.) |
- Click on <key>Finish</key>. | - Click on <key>Finish</key>. |
| |
When the SVN window appears, enter a commit comment (like "Initial Commit") and click <key>OK</key>. | When the SVN window appears, enter a commit comment (like "Initial Commit") and click <key>OK</key>. |
| |
| |
=== Add a File to Version Control === | === Add a File to Version Control === |
- Pull down to "Team", over to "Add to Version Control" and click <key>OK</key>. | - Pull down to "Team", over to "Add to Version Control" and click <key>OK</key>. |
| |
| |
| |
| === Check-Out === |
| |
| **Assuming you have already added one or more repository locations to |
| Subversive**, you can check-out a repository for the first time and |
| create a local/working copy in a few ways. One way is to: |
| |
| - If you are not already, use the SVN perspective by clicking on <key>Window</key>-<key>Open Perspective</key>-<key>Other</key>, selecting "SVN Repository Exploring", and clicking on <key>OK</key>. |
| - Expand the appropriate repository. |
| - Right-click on the appropriate project. |
| - Pull down to "Check Out". |
| |
| Another way is to: |
| |
| - Click on <key>File</key>-<key>Import</key>-<key>SVN</key>-<key>Project From SVN</key>. |
| - Select "Use existing repository", select the appropriate repository from the list, and click <key>Next</key>. |
| - Add the project name to the end of the URL (since there may be more than one project in the repository) and click <key>Finish</key>. |
| - Check "Check out as a project with the name specified", fill in the project name, and click <key>Finish</key>. |
| |
| |
=== Update === | === Update === |
| |
- Right-click on the appropriate folder/file. | - Right-click on the appropriate folder/file. |
- Pull down to "Team" and then to "Update". | - Pull down to "Team" and then to "Update" or "Update to HEAD" |
| |
=== Viewing/Resolving Conflicts === | === Viewing/Resolving Conflicts === |
| |
- Right-click on the file(s). | - Right-click on the file(s). |
- Pull down to <key>Team</key>-<key>Mark as Merged</key> (to inform Eclipse to remove the conflict icon and to inform Subversive that it should allow the commit. | - Pull down to <key>Team</key> and then to <key>Mark as Merged</key> or <key>Mark as resolved</key> (to inform Eclipse to remove the conflict icon and to inform Subversive that it should allow the commit. |
- Perform the commit. | - Perform the commit. |
| |
You might also be interested in the video at | You might also be interested in the video at |
[[ https://www.youtube.com/watch?v=7MB6T9ewidI | https://www.youtube.com/watch?v=7MB6T9ewidI ]] | [[ https://www.youtube.com/watch?v=7MB6T9ewidI | https://www.youtube.com/watch?v=7MB6T9ewidI ]] |
| |
| |
| |
| === Editing Conflicts === |
| |
| If you have any conflicts after you perform an update, you can edit them |
| as follows: |
| |
| - Right-click on the file(s). |
| - Pull down to <key>Team</key> and then to <key>Edit Conflicts</key>. |
| - Use the icons to move between conflicts and accept particular edits. |
| |
| |
=== Commit === | === Commit === |
- Pull down "Team" and then to the command of interest. | - Pull down "Team" and then to the command of interest. |
| |
=== Compare Versions of a File (i.e., diff) === | === Compare Versions of a File === |
| |
To compare different versions of the same file: | To compare different versions of the same file: |
| |
- Right-click on the appropriate folder/file. | - Right-click on the appropriate folder/file. |
- Pull down to "Team" and then to "Mark as Merged". | - Pull down to "Team" and then to "Mark as Merged" or "Mark as Resolved". |
| |
and then commit the folder/file. | and then commit the folder/file. |
| |
The following Subversion commands would normally be preceded by | The following Subversion commands would normally be preceded by |
''%%svn%%'' and the Subversive commands would be initiated by | ''%%svn%%'' and the plug-in commands would be initiated by |
right-clicking on the file/folder. | right-clicking on the file/folder. |
| |
^ SVN Command ^ Subversive ^ | ^ SVN Command ^ Plugin ^ |
| ''%%add%%'' | <key>Team</key>-<key>Add to version Control...</key> | | | ''%%add%%'' | <key>Team</key>-<key>Add to version Control...</key> | |
| ''%%checkout%%'' | <key>Import</key> | | | ''%%checkout%%'' | <key>Import</key> | |
| ''%%delete%%'' | <key>Delete</key> | | | ''%%delete%%'' | <key>Delete</key> | |
| ''%%diff%%'' | <key>Compare With</key> | | | ''%%diff%%'' | <key>Compare With</key> | |
| ''%%resolve%%'' | <key>Team</key>-<key>Mark as Merged</key> | | | ''%%resolve%%'' | <key>Team</key>-<key>Mark as Merged</key> or <key>Team</key>-<key>Mark as Resolved</key> | |
| ''%%propset%%'' | <key>Team</key>-<key>Set Property...</key> | | | ''%%propset%%'' | <key>Team</key>-<key>Set Property...</key> | |
| ''%%revert%%'' | <key>Team</key>-<key>Revert</key> | | | ''%%revert%%'' | <key>Team</key>-<key>Revert</key> | |
| ''%%update%%'' | <key>Team</key>-<key>Update</key> | | | ''%%update%%'' | <key>Team</key>-<key>Update</key> or <key>Team</key>-<key>Update to HEAD</key>| |
| |