[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Feature Request: abilty to commit specific chunks of a file in a revision

From: Molle Bestefich <molle.bestefich_at_gmail.com>
Date: 2005-10-20 10:28:26 CEST

Matt Brown wrote:
> I have an idea for what I think would be a very great and useful feature
> for the subversion client and wanted to get some feedback on it before I
> filed an issue on it. Maybe I'm loopy and this will never happen...
>
> The feature that I would like is the ability to isolate a chunk or
> chunks off the diff between a working copy and the repository and commit
> those chunks separately to other chunks in the file.
>
> Use Case:
> User A is adding a function frobnicate to foo.c, in the process of
> testing the new function a bug is discovered in a function called
> bar2frob which is also found in foo.c.
>
> The fix for the bar2frob function is general and not directly related to
> the addition of the frobnicate function. The user wishes to create two
> separate revisions from this single file so that merging and issue
> tracking is simplified.
>
> The obvious drawback of this proposal would be that it makes the commit
> process slightly more complex. However this could easily be managed by
> only presenting the option of which chunks to commit when svn commit is
> called with a specific argument. This would retain the current behaviour
> while presenting the extension to those users who require it.
>
> Does this sound like a sane feature request?

Very much. I do this all the time.

Just to provide some input, here's how I do a multiple-change checkin with TSVN.

 1. Check out a new working copy.
 2. Copy my modified file(s) over on top of the new WC.
 3. Click 'Commit' in TSVN on the new WC.
 (4. Pick one of the changes, mentally...)
 5. Right-click a modified file, 'Compare with Base'.
 6. Click 'use this text block' on the BASE file for all file
modifications that are _unrelated_ to the logical change I picked.
 7. Repeat 5 & 6 for each file
 8. Write commit text, press OK to commit
 9. Repeat step 2-8 until all changes are committed.

The step count seems high, but it's so far the least cumbersome way of
doing this that I've found.

Another approach:
Someone over on the TSVN mailing list actually implemented a patch to
TSVN which allowed the definition of groups of changes which could be
committed individually. Haven't tried it though. Looks like he's
doing the grouping on a per-file basis, whereas the above has finer
(line) granularity.

Then there's SVK, but that's already been mentioned.

Would be nice to have this stuff standardized.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 20 10:29:56 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.