Using SVN, how do I selectively create a patch file?











up vote
2
down vote

favorite












I have a codebase with several changes in it that are best split up into several commits.



In git, I would use git add -p to select the changes I wanted from each file and create a commit and pull request based on those.



I'm new to SVN and I'm wondering about the best way to achieve this? It looks like I can do file-level selection, but not changes within those files?



I'm using TortoiseSVN as my local version control tool, but I'm happy to use another tool (has to run on Windows) if there's one that will do what I want.










share|improve this question















migrated from softwareengineering.stackexchange.com Nov 22 at 16:43


This question came from our site for professionals, academics, and students working within the systems development life cycle.















  • See this: twitter.com/visualsvn/status/977190471939313664
    – bahrep
    Nov 27 at 13:02















up vote
2
down vote

favorite












I have a codebase with several changes in it that are best split up into several commits.



In git, I would use git add -p to select the changes I wanted from each file and create a commit and pull request based on those.



I'm new to SVN and I'm wondering about the best way to achieve this? It looks like I can do file-level selection, but not changes within those files?



I'm using TortoiseSVN as my local version control tool, but I'm happy to use another tool (has to run on Windows) if there's one that will do what I want.










share|improve this question















migrated from softwareengineering.stackexchange.com Nov 22 at 16:43


This question came from our site for professionals, academics, and students working within the systems development life cycle.















  • See this: twitter.com/visualsvn/status/977190471939313664
    – bahrep
    Nov 27 at 13:02













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have a codebase with several changes in it that are best split up into several commits.



In git, I would use git add -p to select the changes I wanted from each file and create a commit and pull request based on those.



I'm new to SVN and I'm wondering about the best way to achieve this? It looks like I can do file-level selection, but not changes within those files?



I'm using TortoiseSVN as my local version control tool, but I'm happy to use another tool (has to run on Windows) if there's one that will do what I want.










share|improve this question















I have a codebase with several changes in it that are best split up into several commits.



In git, I would use git add -p to select the changes I wanted from each file and create a commit and pull request based on those.



I'm new to SVN and I'm wondering about the best way to achieve this? It looks like I can do file-level selection, but not changes within those files?



I'm using TortoiseSVN as my local version control tool, but I'm happy to use another tool (has to run on Windows) if there's one that will do what I want.







windows svn version-control tortoisesvn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 at 13:03









bahrep

21.7k1074108




21.7k1074108










asked Nov 21 at 17:03









jfowkes

729311




729311




migrated from softwareengineering.stackexchange.com Nov 22 at 16:43


This question came from our site for professionals, academics, and students working within the systems development life cycle.






migrated from softwareengineering.stackexchange.com Nov 22 at 16:43


This question came from our site for professionals, academics, and students working within the systems development life cycle.














  • See this: twitter.com/visualsvn/status/977190471939313664
    – bahrep
    Nov 27 at 13:02


















  • See this: twitter.com/visualsvn/status/977190471939313664
    – bahrep
    Nov 27 at 13:02
















See this: twitter.com/visualsvn/status/977190471939313664
– bahrep
Nov 27 at 13:02




See this: twitter.com/visualsvn/status/977190471939313664
– bahrep
Nov 27 at 13:02












2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.



So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.



If you already know git, this will give you more, for less annoyance.






share|improve this answer





















  • Downvoted because it is something you can get from SVN and VisualSVN.
    – bahrep
    Nov 27 at 13:01










  • Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
    – liberforce
    Nov 27 at 17:22










  • Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
    – liberforce
    Nov 27 at 17:28










  • 1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
    – bahrep
    Nov 27 at 17:33










  • In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
    – liberforce
    Nov 28 at 9:37


















up vote
0
down vote














It looks like I can do file-level selection, but not changes within those files?




This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.



Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.



Here is an animated screenshot:



enter image description here






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435257%2fusing-svn-how-do-i-selectively-create-a-patch-file%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.



    So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.



    If you already know git, this will give you more, for less annoyance.






    share|improve this answer





















    • Downvoted because it is something you can get from SVN and VisualSVN.
      – bahrep
      Nov 27 at 13:01










    • Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
      – liberforce
      Nov 27 at 17:22










    • Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
      – liberforce
      Nov 27 at 17:28










    • 1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
      – bahrep
      Nov 27 at 17:33










    • In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
      – liberforce
      Nov 28 at 9:37















    up vote
    0
    down vote



    accepted










    This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.



    So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.



    If you already know git, this will give you more, for less annoyance.






    share|improve this answer





















    • Downvoted because it is something you can get from SVN and VisualSVN.
      – bahrep
      Nov 27 at 13:01










    • Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
      – liberforce
      Nov 27 at 17:22










    • Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
      – liberforce
      Nov 27 at 17:28










    • 1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
      – bahrep
      Nov 27 at 17:33










    • In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
      – liberforce
      Nov 28 at 9:37













    up vote
    0
    down vote



    accepted







    up vote
    0
    down vote



    accepted






    This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.



    So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.



    If you already know git, this will give you more, for less annoyance.






    share|improve this answer












    This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.



    So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.



    If you already know git, this will give you more, for less annoyance.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 23 at 15:17









    liberforce

    8,1432234




    8,1432234












    • Downvoted because it is something you can get from SVN and VisualSVN.
      – bahrep
      Nov 27 at 13:01










    • Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
      – liberforce
      Nov 27 at 17:22










    • Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
      – liberforce
      Nov 27 at 17:28










    • 1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
      – bahrep
      Nov 27 at 17:33










    • In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
      – liberforce
      Nov 28 at 9:37


















    • Downvoted because it is something you can get from SVN and VisualSVN.
      – bahrep
      Nov 27 at 13:01










    • Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
      – liberforce
      Nov 27 at 17:22










    • Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
      – liberforce
      Nov 27 at 17:28










    • 1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
      – bahrep
      Nov 27 at 17:33










    • In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
      – liberforce
      Nov 28 at 9:37
















    Downvoted because it is something you can get from SVN and VisualSVN.
    – bahrep
    Nov 27 at 13:01




    Downvoted because it is something you can get from SVN and VisualSVN.
    – bahrep
    Nov 27 at 13:01












    Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
    – liberforce
    Nov 27 at 17:22




    Maybe there's a client that implements it but that's no SVN feature. In SVN you end up doing full checkouts when you need to work on different branches. BTW, the "commit this block" feature on VisualSVN is far from doing what Git does. Seems you have to commit block by block, whereas in git you can select your changes, then commit them at once.
    – liberforce
    Nov 27 at 17:22












    Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
    – liberforce
    Nov 27 at 17:28




    Seems that's in Tortoise SVN too: stackoverflow.com/a/17538550/518853
    – liberforce
    Nov 27 at 17:28












    1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
    – bahrep
    Nov 27 at 17:33




    1) TortoiseSVN's "restore after commit" is not the same as partial commits. 2) Core SVN does not have such feature built-in right now, but checkpointing in a local working copy is on the SVN project's roadmap and I guess that it will make " select your changes, then commit them at once" possible in one of the upcoming updates.
    – bahrep
    Nov 27 at 17:33












    In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
    – liberforce
    Nov 28 at 9:37




    In the meantime git has it all, and more. I've worked as an SVN integrator for about 2 × 1.5 years, and used SVN before that as a developper. I learned SVN before git, but once you learned to use git, returning back to SVN is just a pain.
    – liberforce
    Nov 28 at 9:37












    up vote
    0
    down vote














    It looks like I can do file-level selection, but not changes within those files?




    This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.



    Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.



    Here is an animated screenshot:



    enter image description here






    share|improve this answer

























      up vote
      0
      down vote














      It looks like I can do file-level selection, but not changes within those files?




      This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.



      Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.



      Here is an animated screenshot:



      enter image description here






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote










        It looks like I can do file-level selection, but not changes within those files?




        This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.



        Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.



        Here is an animated screenshot:



        enter image description here






        share|improve this answer













        It looks like I can do file-level selection, but not changes within those files?




        This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.



        Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.



        Here is an animated screenshot:



        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 27 at 13:02









        bahrep

        21.7k1074108




        21.7k1074108






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53435257%2fusing-svn-how-do-i-selectively-create-a-patch-file%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            What visual should I use to simply compare current year value vs last year in Power BI desktop

            Alexandru Averescu

            Trompette piccolo