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

Re: Submitted for your perusal: partial commits

From: Molle Bestefich <molle.bestefich_at_gmail.com>
Date: 2006-07-24 14:22:33 CEST

Jonathan Scott Duff wrote:
> Fantasy #2
>
> Another similar mechanism could be to provide an option to "svn diff"
> that lists the hunks that will be committed and an option to "svn ci"
> that accepts a list of hunks to commit (and only those hunks). It
> could look something like this:
>
> $ svn diff --list-hunks
> 1: contrib/hook-scripts/svn2rss.py @@ -13,9 +13,9 @@
> 2: contrib/hook-scripts/svn2rss.py @@ -27,11 +27,13 @@
> 3: contrib/hook-scripts/svn2rss.py @@ -52,8 +54,11 @@
> 4: contrib/hook-scripts/svn2rss.py @@ -62,7 +67,10 @@
> 5: contrib/hook-scripts/svn2rss.py @@ -78,7 +86,7 @@
> 6: contrib/hook-scripts/svn2rss.py @@ -99,30 +107,24 @@
> 7: contrib/hook-scripts/svn2rss.py @@ -152,12 +154,12 @@
> 8: contrib/hook-scripts/svn2rss.py @@ -185,8 +187,8 @@
> 9: contrib/hook-scripts/svn2rss.py @@ -185,8 +187,8 @@
> 10: contrib/hook-scripts/svn2rss.py @@ -212,16 +214,18 @@
> 11: contrib/hook-scripts/svn2rss.py @@ -246,7 +250,7 @@
>
> $ svn commit --hunks 1,2,7-11 -m 'Documentation changes'
>
> That commit line would only commit hunks 1,2,7,8,9,10, and 11. The
> other changes to that file would continue to only exist in the local
> working copy (presumably for a future commit)

Would it not be more fun if you could set a check point in your local
working copy every time you start working on a new logical change?

... working on adding feature XYZ, suddenly discovers a bug ...
$ svn mark -m "adding feature XYZ"
... fix the bug ...
$ svn mark -m "fixed a bug ABC"
... next, switch back to previous flag / check point ...
$ svn switch-to-mark "adding feature XYZ"
... work some more ...

And come commit time:

$ svn switch-to-mark "fixed a bug ABC"
$ svn ci
$ svn switch-to-mark "adding feature XYZ"
$ svn ci

Or am I trying to solve a different problem?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 24 14:23:11 2006

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.