Discussion:
svn feature addition?
Eggler, Ron (GE Energy Connections)
2017-06-01 23:43:58 UTC
Permalink
Hi There,

I am looking for the following features in svn:

- When you do svn commit, instead of automatically submitting all changed files in the directory, in the dialog where you enter the commit message (if -m flag is not used), is there a feature to uncheck any files that should not be committed/select files to be committed?

- Is there an option to inspect each file further line-by-line for lines that have changed to either be selected or excluded from the commit?
I am interested to potentially work on patches that would extend svn with the above functionality if not present already, does anyone know? It seems like these options would be really useful...

Thank you,
Ron
Branko Čibej
2017-06-01 23:58:58 UTC
Permalink
Post by Eggler, Ron (GE Energy Connections)
Hi There,
I suppose you're talking about some GUI Subversion client. Which one?
Post by Eggler, Ron (GE Energy Connections)
- When you do svn commit, instead of automatically submitting all changed files in the directory, in the dialog where you enter the commit message (if -m flag is not used), is there a feature to uncheck any files that should not be committed/select files to be committed?
This should already be possible. If your client doesn't support it,
you'll have to request the feature from its authors.
Post by Eggler, Ron (GE Energy Connections)
- Is there an option to inspect each file further line-by-line for lines that have changed to either be selected or excluded from the commit?
"Including or excluding changed lines from a file before commnt" is also
known as "using a text editor to modify the file". Subverison tracks
whole files, not individual lines. In fact the repository does not care
if the file contains text or not.
Post by Eggler, Ron (GE Energy Connections)
I am interested to potentially work on patches that would extend svn with the above functionality if not present already, does anyone know? It seems like these options would be really useful...
They're useful, and they exist ...


-- Brane
Daniel Shahaf
2017-06-02 02:02:40 UTC
Permalink
Post by Branko Čibej
Post by Eggler, Ron (GE Energy Connections)
- Is there an option to inspect each file further line-by-line for lines that have changed to either be selected or excluded from the commit?
"Including or excluding changed lines from a file before commnt" is also
known as "using a text editor to modify the file". Subverison tracks
whole files, not individual lines. In fact the repository does not care
if the file contains text or not.
I think the OP is looking for an equivalent to 'git add -p && git commit'.

The off-the-cuff answer is "Use git-svn", but maybe there's a better way...
Ryan Schmidt
2017-06-02 23:08:58 UTC
Permalink
Post by Branko Čibej
Post by Eggler, Ron (GE Energy Connections)
- Is there an option to inspect each file further line-by-line for lines that have changed to either be selected or excluded from the commit?
"Including or excluding changed lines from a file before commnt" is also
known as "using a text editor to modify the file". Subverison tracks
whole files, not individual lines. In fact the repository does not care
if the file contains text or not.
Now that one of the projects I work on has switched to git and I'm trying (unsuccessfully) to learn it, I've started using GitHub Desktop on my Mac, which has this feature. I may have modified several lines in a file, but GitHub Desktop gives me checkboxes for each line in the diff so that I can select which of them I want to commit. It's the one aspect of working with git that I prefer over svn so far.
Johan Corveleyn
2017-06-02 11:01:01 UTC
Permalink
On Fri, Jun 2, 2017 at 1:43 AM, Eggler, Ron (GE Energy Connections)
Post by Eggler, Ron (GE Energy Connections)
Hi There,
- When you do svn commit, instead of automatically submitting all
changed files in the directory, in the dialog where you enter the commit
message (if -m flag is not used), is there a feature to uncheck any files
that should not be committed/select files to be committed?
With the commandline client that's not possible at the moment (GUI
clients might offer this in their commit dialog). Would be nice
though. I guess the UI for 'svn' might be to edit the stuff below
"--This line, and those below, will be ignored--" in your editor that
comes up for the commit message.

I did some archaeology and found an old discussion about this [1]. It
got some support, but it seems not enough to eventually implement it.
In that thread, Karl Fogel hinted there was a closed issue and earlier
dev@ discussion about it, which I found here [2] (issue #1295) and
here [3].

The issue also refers to a patch by Mark Grosberg ([4], [5]). His last
patch submission ([5]) contains a long discussion which reads a bit
"bikesheddy". Eventually it seems the discussion died and the patch
did not get committed. (If you search the dev@ archives for 1295 there
are earlier iterations of the patch which contain some more
discussion).

Maybe that last patch can be brought back to life, and re-discussed?
Post by Eggler, Ron (GE Energy Connections)
- Is there an option to inspect each file further line-by-line for
lines that have changed to either be selected or excluded from the commit?
Ah, now that's an interesting feature that I also miss sometimes. I
listed it on the whiteboard during the svn hackathon in 2015 [6], I
referred to it as "partial commit". It's not possible right now with
"core svn", but TortoiseSVN has implemented a way to do this with what
they call "restore after commit" [7].

I think it would be great to have such a feature in SVN itself.

For some more background, it has been discussed before a couple of
times on our lists ([8], [9]), and on StackOverflow ([10], [11]).
Someone even seems to have implemented in a script something similar
to the TSVN feature [12].
Post by Eggler, Ron (GE Energy Connections)
I am interested to potentially work on patches that would extend svn with
the above functionality if not present already, does anyone know? It seems
like these options would be really useful…
I think it would be great if you could work on this. We're mostly a
volunteer-driven project these days, so helping hands are always
welcome. If you want to discuss specs or design, or start writing /
discussing patches, it's best to bring those to the dev@ mailinglist
(and take a look at our Community Guide [13]).


[1] https://svn.haxx.se/users/archive-2005-06/0557.shtml

[2] https://issues.apache.org/jira/browse/SVN-1295 (Ability to edit
the list of files being commited)

[3] https://svn.haxx.se/dev/archive-2002-01/0715.shtml

[4] https://svn.haxx.se/dev/archive-2003-05/0709.shtml

[5] https://svn.haxx.se/dev/archive-2003-05/0904.shtml

[6] https://svn.haxx.se/dev/archive-2015-09/0187.shtml -- see "(
partial commit (one hunk out of many) (-> TortoiseSVN?) )"

[7] https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-commit.html#tsvn-dug-commit-restore

[8] https://svn.haxx.se/dev/archive-2006-07/0817.shtml

[9] https://svn.haxx.se/users/archive-2010-01/0287.shtml

[10] https://stackoverflow.com/questions/75809/partial-commits-with-subversion

[11] https://stackoverflow.com/questions/314132/is-there-some-way-to-commit-a-file-partially-in-tortoisesvn

[12] http://webstaff.itn.liu.se/~karlu20/div/blog/2013-05-31_SVNPartialCommit.php

[13] http://subversion.apache.org/docs/community-guide/
--
Johan
(Going for the record of most footnotes in an svn-mailinglist-post)
Eggler, Ron (GE Energy Connections)
2017-06-02 16:30:29 UTC
Permalink
[snip]
Post by Johan Corveleyn
Post by Eggler, Ron (GE Energy Connections)
- When you do svn commit, instead of automatically submitting all
changed files in the directory, in the dialog where you enter the
commit message (if -m flag is not used), is there a feature to uncheck
any files that should not be committed/select files to be committed?
With the commandline client that's not possible at the moment (GUI
clients might offer this in their commit dialog). Would be nice though. I
guess the UI for 'svn' might be to edit the stuff below "--This line, and
those below, will be ignored--" in your editor that comes up for the commit
message.
I did some archaeology and found an old discussion about this [1]. It got
some support, but it seems not enough to eventually implement it.
discussion about it, which I found here [2] (issue #1295) and here [3].
The issue also refers to a patch by Mark Grosberg ([4], [5]). His last patch
submission ([5]) contains a long discussion which reads a bit "bikesheddy".
Eventually it seems the discussion died and the patch did not get
iterations of the patch which contain some more discussion).
Maybe that last patch can be brought back to life, and re-discussed?
Post by Eggler, Ron (GE Energy Connections)
- Is there an option to inspect each file further line-by-line for
lines that have changed to either be selected or excluded from the
commit?
Ah, now that's an interesting feature that I also miss sometimes. I listed it
on the whiteboard during the svn hackathon in 2015 [6], I referred to it as
"partial commit". It's not possible right now with "core svn", but
TortoiseSVN has implemented a way to do this with what they call "restore
after commit" [7].
I think it would be great to have such a feature in SVN itself.
For some more background, it has been discussed before a couple of times
on our lists ([8], [9]), and on StackOverflow ([10], [11]).
Someone even seems to have implemented in a script something similar to
the TSVN feature [12].
Post by Eggler, Ron (GE Energy Connections)
I am interested to potentially work on patches that would extend svn
with the above functionality if not present already, does anyone know?
It seems like these options would be really useful…
I think it would be great if you could work on this. We're mostly a
volunteer-driven project these days, so helping hands are always welcome.
If you want to discuss specs or design, or start writing / discussing patches,
Community Guide [13]).
[1] https://svn.haxx.se/users/archive-2005-06/0557.shtml
[2] https://issues.apache.org/jira/browse/SVN-1295 (Ability to edit the list
of files being commited)
[3] https://svn.haxx.se/dev/archive-2002-01/0715.shtml
[4] https://svn.haxx.se/dev/archive-2003-05/0709.shtml
[5] https://svn.haxx.se/dev/archive-2003-05/0904.shtml
[6] https://svn.haxx.se/dev/archive-2015-09/0187.shtml -- see "( partial
commit (one hunk out of many) (-> TortoiseSVN?) )"
[7] https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-
commit.html#tsvn-dug-commit-restore
[8] https://svn.haxx.se/dev/archive-2006-07/0817.shtml
[9] https://svn.haxx.se/users/archive-2010-01/0287.shtml
[10] https://stackoverflow.com/questions/75809/partial-commits-with-
subversion
[11] https://stackoverflow.com/questions/314132/is-there-some-way-to-
commit-a-file-partially-in-tortoisesvn
[12] http://webstaff.itn.liu.se/~karlu20/div/blog/2013-05-
31_SVNPartialCommit.php
[13] http://subversion.apache.org/docs/community-guide/
Your response is packed with very interesting information and resources, it will take me some time to work through all of it but I'm definitely interested in a follow up.
Thanks Johan!
--
Ron

Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe
Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-d
Andrew Reedick
2017-06-02 14:46:23 UTC
Permalink
Sent: Thursday, June 1, 2017 7:44 PM
Subject: svn feature addition?
Hi There,
- When you do svn commit, instead of automatically submitting all changed files in the directory, in the dialog where you enter the commit message (if -m flag is not used), is there a feature to uncheck any files that should not be committed/select files to be committed?
- Is there an option to inspect each file further line-by-line for lines  that have changed to either be selected or excluded from the commit?
I am interested to potentially work on patches that would extend svn with the above functionality if not present already, does anyone know? It seems like these options would be really useful.
What about working on a (temp) branch and then selectively merging what you want over?

Steps would be:
Make temp branch
Switch to temp branch
Commit all
Switch to main branch
Selectively merge files/lines from temp to main
Commit main.
"Copy merge" from temp to main to overwrite workspace with stuff from temp in order to recreate modified files (i.e. files that you only merged a few lines from) that existed initially.
Rm temp branch
Keep working.

Most of that should be scriptable.
Continue reading on narkive:
Loading...