Standard Methods for Subversion

I am wondering if there are any other factors to consider for the standard practice of using Subversion.

A bit of what I have:

  • Directory / tag / trunk / branch structure

  • All work is done in a torso that does not interfere with functionality.

  • Branch, when major structural changes are made or a function is added that breaks the core functionality (depending on preferences)

  • Tags contain stable releases

  • Always update before starting work.

  • Replace changes at the end of the day / when a function is added

  • Compilation notes contain a description

  • Commit based on function - do not wrap

I am in conflict with a rule to fix it at the end of the day and when a function is added. I speak at the end of the day to ensure that the repository is as relevant as possible. However, the code at the end of the day may be incomplete / intermittent. However, committing only when functions have been completed can lead to obsolete / conflicts?

I would be grateful for your criticism regarding any of my ideas and any of your ideas that I have missed.

Thanks!

+7
svn
source share
9 answers

A few more notes: (tried not to repeat what has already been said.)

Branch:

  • In addition to branching for large pieces of the feature development mentioned above, you can branch out when you need to work with patches after release, while parallel work progresses along the trunk / trunk.

  • Reverse merge regularly if you use branches that live long without merging with the core development. This will help maintain synchronization with the development of the trunk and minimize complications of the merger of a big hit.

  • Pay attention to how you name your branches. We are trying to name the branches after the stage on which it is based. This helps when you need quick differences or reports, or even while viewing something if the names are explanatory.

  • Since the branch is a cheap copy in SVN, we always try to enter the root directory of the project (if the folder itself is by itself, then the branch will be absent) - this avoids confusion later about who forks there and avoids the need to run commands to figure it out. And if you need to check things from a branch, then each of them under the branch is available to you if you need it.

Captures:

  • I vote for commits often and in logical chunks so that you can link related files using a generic comm post. This is great when you want the log and report to run in chunks with a bunch of files that are neatly linked to the corresponding comments.

  • I vote for frequent commits, if not every day. This is a way of thinking. As soon as you see the benefits of early commits (of course, after developers have verified basic compilation errors and run unit tests in their dev block), you would be happy to catch those early errors / build problems. If you plan to run nightly builds or use a continuous integration tool, you would be better off getting people to complete as early as possible to get an idea of ​​the integrated workflows and run tests on them.

Tags:

  • Draw release naming conventions - although this seems trivial, it helps to have good tag names. Also, make sure that the commit commit comments for tags accurately determine why you flag this version of the repository. We only mark when we complete the milestones, so in our case we compare the tag fix messages with the continuous assembly number (cruise build tag) that we use for this assembly. It also helps to have a release numbering scheme and fields defined so that you can use them for tags.
+6
source share

You should always do an update before committing to prevent potential conflicts with other commits made by other people and painful merges.

In addition, each commit should contain something meaningful, for example, a fix or a new function, or some improvement on an existing one, which may be significant, described in the log message. The source management tool is not a backup tool, so you should avoid fixing the "end of the day" without meaningful content.

+5
source share

If you are new to SVN, then the SVN Book is a good (free) resource (you can also buy copies of dead trees from O'Reilly).

+4
source share

If the β€œfunction” needs more than a few (4-6) hours, I would either

  • divide the β€œfunction” into sub-tasks that can be completed in a few hours and verified in the control source
  • create a branch
  • both of the above
+4
source share

"However, committing only when functions were completed can lead to obsolete / conflicts?"

If the change is so great that you are worried about it, then you should probably have a forked one. This will allow you to make small commits if incremental work does not break the build, and leave a clear history after merging with trunk.

+3
source share

I would try to commit as often as possible. To resolve this, you must ensure that the code you write is not yet in use or that all tests pass. If you stay in one of these two modes (the latter is much better than the first), you do not have to worry about those large periods when you cannot commit.

TDD is very helpful in this regard.

+3
source share

Affiliates are a good idea for making big, possibly serious, changes. If the trunk is updated at the same time, sometimes merge the trunk into a branch to update the branch.

Commit the atomic set of related changes. Do not make a big commit with unrelated changes. This greatly facilitates tracking certain changes.

You can have multiple checks of the same source - useful if you are experimenting with unrelated changes.

Avoid breaking code or code with failed tests or other problems.

+2
source share

There are many changes regarding source code management workflows. The one we use is an extension of what you describe in your post. Your workflow is good enough for minor changes, but not if you have several teams working on different issues of considerable complexity.

What we do is branching out for each team, than the team can take responsibility for the team (project) branch. Each team is also responsible for synchronizing the command branch with the connecting trunk by merging the trunk with the branch, preferably after each fixation on the trunk. At the end of the project, the branch is again merged into a trunk (reintegrated) and removed.

This branch of the approach is merge ... merge - merge back - removal works well for us

0
source share

I recently participated in improving the software configuration management (SCM) methods used by the company I work for. We found that branching for development and branching for release work quite well.

A good book on SCM templates / standard procedures that I found useful is "Software Configuration Management Templates: Effective Collaboration, Practical Integration from Berczuk and Appleton."

0
source share

All Articles