Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
student:eclipse:subversion [2019/02/13 16:49] bernstdhstudent:eclipse:subversion [2019/03/20 20:08] bernstdh
Line 4: Line 4:
  
 There are two different Eclipse plugin that integrate Subversion (SVN) There are two different Eclipse plugin that integrate Subversion (SVN)
-with Eclipse, Subversive and Subclipse.+with Eclipse, Subversive and Subclipse. They are very similar in many ways.
  
  
-==== Installing Subversive ====+==== Installation ====
  
-There are three different ways to start the process of installing Subversive.+There are two different ways to start the process of installing Subversive or Subclipse.
  
  
-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.)
  
  
Line 23: Line 23:
   - Start Eclipse.   - Start Eclipse.
   - Click on <key>Help</key>-<key>Eclipse Marketplace</key>.   - Click on <key>Help</key>-<key>Eclipse Marketplace</key>.
-  - Enter ''%%Subversive%%'' in the "Find:" textfield and click on the magnifying glass. +  - Enter ''%%Subversive%%'' or ''%%Subclipse%%'' in the "Find:" textfield and click on the magnifying glass. 
-  - Click on "Install" in the "Subversive" pane. (Note: There is another SVN plug-in called Subclipse that is very similar to Subversive. Make sure you select "Subversive".)+  - Click on "Install".
  
 === Starting the Process with the Installer === === Starting the Process with the Installer ===
Line 33: Line 33:
   - Click on <key>Help</key>-<key>Install New Software</key>.   - Click on <key>Help</key>-<key>Install New Software</key>.
   - In the "Work with" list, select the appropriate version of Eclipse.   - In the "Work with" list, select the appropriate version of Eclipse.
-  - Expand the "Collaboration" node, and select the latest version of the "Subversive SVN Team Provider".+  - Expand the "Collaboration" node, and select the latest version of the "Subversive" or "Subclipse".
   - Click on "Next" twice.   - Click on "Next" twice.
  
-=== Starting the Process with a WWW Browser === 
  
-To start the installation using a WWW browser you should: 
  
-  - Start Eclipse. +=== After the Process is Completed ===
-  - Start a WWW browser. +
-  - Navigate to ''%%http://www.eclipse.org/subversive/%%''+
-  - Drag the "Install" icon from the WWW browser into a running Eclipse workspace.+
  
-=== After the Process has Started ===+Regardless of how you start the process, after it is completed you should restart Eclipse. 
  
-Regardless of how you start the processafter it is started you should: +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:
- +
-  - When the dialog box appears, click on <key>Confirm</key>+
-  - When the next dialog box appears (which may take a few minutes), check "I accept..." and then click on <key>Finish</key>+
-  - Restart Eclipse. +
-  - You should 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..."        +
   - 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>.
Line 59: Line 49:
   - 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%%''.
  
  
-  - 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).          +=== Identifying a Repository === 
-  - 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>  + 
 +  - 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>  
   - Click on {{eclipse_new-repository-location.gif}}.   - Click on {{eclipse_new-repository-location.gif}}.
-  - After the dialog box opens, on the "General" tab enter the URL         in the "URL:" field and your JMU authentication information         (i.e., your JMU eID and password) in the "User:" and         "Password:" fields.  (Note: If you also select <key>Save         authentication</key> information 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. Of course, you         should not save your authentication information if you are         using a "public" machine/account.)          +  - After the dialog box opens, enter the URL in the "URL:" field. 
-  - On the "SSH Settings" tabselect <key>Password</key>+  - Complete the process. 
-  Click <key>Finish</key>.+ 
 +=== Authentication === 
 + 
 +The plugin will need to authenticate with ''%%stu%%'' every time an operation is performed, and this can be quite inconvenientThere 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 caseyou 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. 
 + 
 +In either case, **should not save your authentication information on a "public" machine**.
  
  
  
  
-==== Using Subversive ====+==== Using the Plugin ====
  
  
-The Subversive plugin enables you to execute SVN commands from within+The Subversive and Subclipse plugins enable you to execute SVN commands from within
 Eclipse. Eclipse.
  
Line 100: Line 106:
 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>. 
-  - Right-click on the appropriate repository. 
-  - Pull down to "Find/Check Out As...". 
-  - Check "Check out as a project configured using the New Project Wizard" and create the appropriate kind of project. 
- 
-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>. 
  
  
Line 129: Line 116:
   - 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 ===
Line 142: Line 129:
   - 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 ===
Line 149: Line 156:
  
   - 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 ===
Line 165: Line 172:
  
   - 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 ===
Line 191: Line 210:
   - 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:
Line 220: Line 239:
  
   - 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.
Line 254: Line 273:
  
 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> |
Line 263: Line 282:
 | ''%%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>|