svn feature addition?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

svn feature addition?

Eggler, Ron (GE Energy Connections)

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

 

 

Reply | Threaded
Open this post in threaded view
|

Re: svn feature addition?

Branko Čibej
On 02.06.2017 01:43, Eggler, Ron (GE Energy Connections) wrote:
> Hi There,
>
> I am looking for the following features in svn:

I suppose you're talking about some GUI Subversion client. Which one?


> -        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.

> -        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 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
Reply | Threaded
Open this post in threaded view
|

Re: svn feature addition?

Daniel Shahaf-2
Branko Čibej wrote on Fri, 02 Jun 2017 01:58 +0200:
> On 02.06.2017 01:43, Eggler, Ron (GE Energy Connections) wrote:
> > -        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...

Reply | Threaded
Open this post in threaded view
|

Re: svn feature addition?

Johan Corveleyn-3
In reply to this post by Eggler, Ron (GE Energy Connections)
On Fri, Jun 2, 2017 at 1:43 AM, Eggler, Ron (GE Energy Connections)
<[hidden email]> wrote:
> 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?

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?

> -        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].

> 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)
Reply | Threaded
Open this post in threaded view
|

RE: svn feature addition?

Andrew Reedick-2
In reply to this post by Eggler, Ron (GE Energy Connections)


> From: Eggler, Ron (GE Energy Connections) [mailto:[hidden email]]
> Sent: Thursday, June 1, 2017 7:44 PM
> To: [hidden email]
> Subject: svn feature addition?
>
> 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.

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.


Reply | Threaded
Open this post in threaded view
|

svn feature addition?

Eggler, Ron (GE Energy Connections)
In reply to this post by Johan Corveleyn-3
[snip]

> > -        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?
>
> > -        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].
>
> > 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/
>
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-desabonnement
Reply | Threaded
Open this post in threaded view
|

Re: svn feature addition?

Ryan Schmidt-8
In reply to this post by Branko Čibej

On Jun 1, 2017, at 18:58, Branko Čibej wrote:

>> -        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.