Showing posts with label Subversion. Show all posts
Showing posts with label Subversion. Show all posts

Monday, October 20, 2014

NetBeans: Use an old/previous version/revision of code/file/project, Revert vs Checkout

If for some reason, one of your code users could not accommodate the recent modifications of the code at the moment and would like to go back to an old version of the code, you could either revert your current code to the old version or checkout the old version, and then do a build and send the jar to your code user.

A. Revert

  1. Open the window explorer, find the file or project that you are interested in, make a copy of it and save it some where.
  2. In NetBeans, right-click on the file/project, select "Subversion", then "Revert Modifications"
  3. In the pop-up window, select "Revert Modifications from Single Commit", then click the "Search" button.
  4. In the new pop-up window, click the "List" button, click on the revision that you would like to revert to, then click the "OK" button at the bottom.
  5. Click the "Revert" button.
Revert may generate conflicts in file.

After you have sent the jar to the particular user, you can follow the procedure to revert your code back to the current revision. Or simply update the code to the HEAD.

B. Checkout

  1. In NetBeans, close the project.
  2. In Window Explorer, rename the project to something else.
  3. In NetBeans, click "Team" on the top menu, select "Checkout"
  4. Enter the correct information related to your repository n the pop-up window, and click the "Next" button.
  5. Click the "Browse" button at the line of "Repository Folder(s) to choose the project that you would like to checkout
  6. Click the "Search" button at line Repository Revision.
  7. In the new pop-up window, click the "List" button, click on the revision that you would like to revert to, then click the "OK" button at the bottom.
  8. Click the "Finish" button.

After you have finished with the old code, you can update the code to your current working version and close the project in NetBeans. In window explorer, rename the old project and rename the current revision of the project back to the project name and open the project in NetBeans.

-------------------------------------------------------------------------------------------------------------------

                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.

Thursday, February 20, 2014

Subversion BASE, HEAD, and working copy

BASE is the revision you obtained from the repository. HEAD is the latest revision in the repository. If someone committed a change after you obtained your code from the repository, your BASE is different from the HEAD. You can do a "Update to HEAD" to make your code the same as the HEAD which is the latest revision.

If you want to see the changes you have made after you obtained your code last time, you perform "diff to BASE". If you would like to know the difference between your local code and the latest revision in the repository, you perform "diff to HEAD" or "diff to repository". After you committed your changes successfully, both the BASE and HEAD are now the same as what you have just committed.

The working copy is the local code you obtained from the repository for development. If no modification is made, it is the same as the BASE. After local changes are committed, it is the same as the HEAD. If it is neither the same as the BASE nor the same as the HEAD, a merge is needed before commit.

--------------------------------------------------------------------------------------------------------------

                        

If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.