How to make a tag in SVN using eclipse?

27,458

Solution 1

You would need to install an Eclipse Subversion plugin like subclipse or Subversive. This will provide the same facility as that available for CVS.

For instance, here is the documentation on how to tag using Subversive.

Solution 2

Normally, SVN has three root level directories,

  1. trunk
  2. tags
  3. branches

In SVN server, for each project, you have the same above directory structure.

'trunk' is where you keep your ever developing code base.

'tags' is used for the same purpose that you've indicated. i.e. for versioning.

'branches' is used for things like feature developments/individual development.

An example, Let's say I am developing a database synchronization application which will go out as Pilot release, Moonshine release, Kilimanjaro release, Great release and onwards..

I start in 'trunk' and continue my development for let's say 2 months at which time I am ready for Pilot release..

Then I create a 'tag' of the 'trunk' which I can name 'Pilot tag' which will be released to customers..

Now my main feature developments for next release which is 'Moonshine release' will continue in the 'trunk'. If their are any immediate bug fixes or show-stoppers in my 'Pilot release' those will be done in the 'Pilot tag' and released to the customers immediately..

However since the above fixes are not in my 'trunk' code, sometime later (before releasing the Moonshine release) I will 'merge' the modifications done in my 'Pilot tag' back to 'trunk'.

Here, there can be conflicts since the same code lines could have been modified in both 'Pilot tag' (for bug fixing mentioned earlier) and in 'trunk' (for feature modifications/development of new release). In this situation, you have to carefully review the conflicts, edit any such conflicts and accept the changes.

TortoiseSVN is the primary client tool for using SVN. It embeds features directly to your Windows right click menu for all above mentioned functionalities like commit, update, merge, branch (i.e. tag or branch) etc.

And for conflict resolution I personally prefer 'Beyond Compare' which is a third party application which you have to buy. You can setup TortoiseSVN to invoke Beyond Compare as the application for conflict resolution and it is far better and user-friendly than the built in conflict editor in TortoiseSVN tool.

Solution 3

To TAG, using Eclipse with SubClipse:

  • select Team, Branch/Tag, then click the 'select' button and drill into the appropriate project, then click 'tags' directory, and drill down to your last tag name or any similar name you plan on creating.

  • The full URL is copied into bar, then you can edit it changing the rightmost tag name portion to any new tag name.

  • Click next, select from HEAD (HEAD is referring to the repo path you have established already on previous page so in fact may be the Head of a Branch).

  • Enter a comment like 'tagging <appName> Release <for reason> version x.y.z'

Finish -

You can prior to this point or after, open the Eclipse 'SVN Console' from dropdown on right bottom of page, and see most recent SVN commands generated and there results.

Solution 4

Every checkin in SVN creates an new revision number. SVN revision number should be equivalent of your tag. Remember the SVN revision number for the production build.

Share:
27,458
choop
Author by

choop

Java developer

Updated on July 09, 2022

Comments

  • choop
    choop almost 2 years

    I'm using eclipse and Subversion (SVN) is my new version control.

    Till now I used to use Concurrent Versions System (CVS) as my version control and after deploy operation I used to tag my projects with Tag as Version in eclipse like this:
    Team --> 'Tag as Version..' --> Version-X-Y-Z

    How can I do it now using SVN?