Process of SVN Tagging with Externals
I have one single repository.
开发者_开发知识库Suppose I have LibraryX which I share across projects.
Suppose ApplicationA (among others) uses LibraryX and references it as an external.
While developing ApplicationA, I am also possibly making modifications to LibraryX.
Suppose changes have been made to both ApplicationA and to LibraryX, and now I am doing a release.
Please tell me if you agree/disagree with the following process, and/or tell me what you would do to improve it:
- create a tag of LibraryX
- branch ApplicationA
- change externals on the branched ApplicationA to point to the tagged LibraryX and perhaps to the specific revision (in case someone in the future commits to the tag accidentally)
- create a tag of the branched ApplicationA
- delete the branched ApplicationA
Sound reasonable? Got better ideas? Thoughts?
I do the following:
- I always reference the library in a specific revision. If the library changes and I want the change in my application then I update the externals definition.
- On release I create a tag of the application. I do not need to take extra steps, since a specific revision of the library is referenced.
Some additional comments:
- Sometimes I do not references a specific version of the library (because I am too lazy), but I am aware that these revisions will not be usable in the future. This is a decision you can make if you are aware of it. However, before I create a tag, I always freeze the library reference.
- Sometimes I create a branch instead of a tag, so that I can fix some bugs and at the same time continue to work on the next release. Eventually I create a tag for this branch and delete the branch. (Maybe I create more then one tag, but the branch always gets deleted at the end.)
- I delete branches because I use branches only as short-lived entities: feature branches or release branches to stabilize a release. There is no need for me to keep the branch around since tags are the versions I am interested in.
- If I need to fix a bug in a tag then I create a branch first. Fix the bug and create a new tag (and delete the branch).
- The same applies if the bug needs to be fixed in the library (though a bit more complicated): In the branch you either update to the latest library (if possible) or you create a branch of the referenced revision of the library. Then you change the external to point to this branch, fix the bug in the library, freeze the externals definition to the latest revision of the library branch and create a tag for the application . I usually do not bother to create a tag for the library, but it would also be possible. I do however delete the library branch: If it is ever needed again you can create a new branch based on the last revision of the deleted library branch.
- Tag for external is waste of time
- Branch for ApplicationA + edit (fix rev. of LibraryX) svn:external in branch + commit + tag last revision in branch as "product tag"
精彩评论