jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:Reputation: 28
At $Job, I am admonished, "Always develop in a branch. Never develop in trunk." So when I recently earned commit privileges to the Parrot subversion repository, one of the first things I did was to create a branch in which to work on my refactoring of some of Parrot’s build tools written in Perl 5.
The problem is: I’m spending too much time maintaining the branch. I seek the wisdom of the monks in figuring out how to use Subversion branches most expeditiously.
Let me describe the problem more precisely. At any given time, I’m taking a script executed by make and located in the tools/build/ directory, extracting its functionality into a new module placed in the lib/Parrot/ directory, and writing a test suite placed in the t/tools/ directory. While testing the new module’s subroutines, I also have need to read source code such as ops files found in the src/ops/ directory.
That may sound complex, but it really amounts to only a half of one percent of all the files and directories in the Parrot source tree. So of all the files in my buildtools branch, 0.5% are there so that they don’t hurt anything in trunk, while 95.5% might just as well be identical to the files in trunk — which means that I would like to keep them in synch with trunk as much as possible. (After all, a change in one of those files might affect the outcome of the tests.)
After reviewing the Subversion book, the only way I’ve found to accomplish this is this:
- In my branch, call svn update to determine the version (let’s call the revision n).
- Call svn merge -r 16803:n https://svn.perl.org/parrot/trunk, where 16803 is the revision at which my branch was created.
- Ideally, at this point I call svn commit and everything updates nicely. But in practice, I get all kinds of conflicts which have little immediate significance but which must be resolved for a commit to succeed. Examples: changes in file properties; conflicts in the MANIFEST. In other words, things that waste my time and don’t make development in my branch any easier.
In other words, I want to keep my branch reasonably up-to-date so that I can be assured that my own files will eventually commit to trunk correctly — but I don’t want to spend 15 minutes a night resolving spurious conflicts in the branch. How can I do this most effectively?
Thank you very much.Jim Keenan