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.

No comments:

Post a Comment