I continued to work at Trunk when I had to create Branch for some major changes (Subversion, TortoiseSVN)

I started a set of basic changes affecting many different areas of the application, demanded changes in the database schema, our objects and presentation code. I started with rev.1101. You could consider it as an ideal case for creating a branch that will later be merged and integrated back into Trunk after testing and completion.

But I did not create a new branch. I continued to work on Trunk.

Here is the situation we started with

Trunk is now in rev. 1116, and I am in an unenviable (?) Position that I need to make some corrections in the version about 15 versions ago, which is the current version in the release, and then release the bugfixed “rev. 1101 + corrections” for production without any work from revs 1102-1116.

Question: How do I restore Trunk and move all the latest changes to Branch? . I create a branch from what is now in Trunk and it becomes / Branches / MajorChangeSet, then put Trunk back in rev.1101, consider that as the official Trunk and start working with corrections there?

A map of our SVN revisions, branches, etc.

UPDATE: I followed the procedure recommended by ChrisH below (according to the layout above), and now we are in great shape. We continue to update "turnover 1102" with corrections and minor improvements. They were painless and easily merged into the trunk to make sure that these changes also introduced it into our new development efforts. Thanks everyone!

Branch v. Trunk | Branch / Tag / Trunk? | Disable when?

+8
svn tortoisesvn
source share
4 answers

I recommend creating a release branch every time you start making release candidates. Trunk remains alive to work on things that don't go on release (the .next version, as we say). A release release is reserved only for bug fixes and material that should be included in the release. It is good practice to always transfer them to the trunk first and then the cherry pick to merge them into the release branch. Always try to merge from the trunk into other branches, because it simplifies the task. Reintegration of the "function branches" into the trunk is fine, but fixing the error in the release branches and then merging it back into the tube should be avoided.

After the release is in the wild, the release branch is maintained to fix additional bugs and ultimately makes small releases. You still need to fix bugs in the trunk (don't send them to the .next release) and combine them with every release branch that you still actively support.

The good news is that you can start this methodology after the fact. Go back to the revision of the torso from which your current version was created, and create a release branch. TortoiseSVN has a convenient menu for creating tags and branches from specific changes when you right-click on a revision in the log viewer.

Once you have a release branch, you need to check it out and start merging with the bug fixes that you want to publish. All your new work in the trunk stays where it is. If the connecting line and release branch diverge significantly, you may just need to make corrections directly on the release branch, but try making them in the connecting line and merge them into the release branch when you can.

One more thing. Each time you submit a release from the release branch, you must make a copy of the tags with the version version label. This can be useful later to find out what has changed between versions or rebuild the old release if you need to. We get to the full assembly from the tag when sending the release, because we insert the SVN version number into our version of the product, so that if the client reports an error, we know exactly what code they are executing (since the versions of SVN are unique through the repository).

Hope this helps, and good luck.

+5
source share

One approach is to create a branch for each major version, on which you can apply bug fixes regardless of any work performed on the trunk.

To create a branch retrospectively, try:

svn copy http://svn/path/to/trunk@1101 \ http://svn/path/to/branches/last_monday_release 

@1101 is a binding revision - essentially, we say "find out what trunk is mentioned in revision 1101, and then copy to make a branch."

(there is a scary explanation in the SVN book for binding changes if you feel brave)

0
source share

Well, this is a bit of a mess no matter how you look at it, but you also haven’t done anything frankly wrong. You just continued to develop in your trunk - which is right, but now you need to go back to the previous version and add some changes, and then release it again.

The problem is that you have a series of fixes with bug fixes and new features, and you're just trying to make mistakes from a specific point in time and ignore everything else. It would be a little easier if bug fixes were in discrete versions (at least for identification purposes), but often they tend to accompany other changes.

Two options:

  • Take the branch of the latest version that you released, then manually move the fixes.
  • Take the branch of the latest revision in which the bug was fixed, and remove the new features.

Depending on the balance between new features and bug fixes, one of them will probably be easier than the other. In any case, you want to get a branch, especially for this version.

0
source share

One way to fix this is

  • create a working branch from the HEAD trunk
  • remove connecting line
  • recreate luggage from the boot version to your random changes.

This way you will not see random fixes and reversals in the journal / fault on the trunk. But keep in mind when updating working copies - I'm not sure how well svn update handles deleting and restoring repository locations.

0
source share

All Articles