Announcement

Collapse
No announcement yet.

Apply patch

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apply patch

    When opening a patch file through the tools menu you can browse the file and in the edit menu choose "Apply patch". Under linux I get the following error:

    sh: /usr/lib/beyondcompare/patch.exe: No such file or directory.

  • #2
    Thank you for the bug report. That will be fixed in the next release.
    ZoŽ P Scooter Software

    Comment


    • #3
      In the nightly build from 20140128 it's fixed!

      Comment


      • #4
        I received a similar message on OSX (BC4 for Mac):

        sh: /Applications/Beyond Compare.app/Contents/MacOS/patch.exe: No such file or directory

        --
        BeyondCompare 4.0 beta (build 17451)
        OS X 10.9.1

        Comment


        • #5
          The nightly release is not widely available, but a few specific users are testing with it for specific bugs we are trying to track down. This should be updated in the next Beta release.
          Aaron P Scooter Software

          Comment


          • #6
            When is this feature going to be released? I have BC4 Build 17666 installed and this feature doesn't seem to be working yet.

            Comment


            • #7
              It should be working in 17666. What kind of error are you getting?
              ZoŽ P Scooter Software

              Comment


              • #8
                Just not sure how it works. I have a Linux kernel source which I have duplicated (LKS1 and LKS2). Both folders are under GIT source revision control. I make changes to multiple files on LKS1 and commit those changes to GIT. I do a "git diff" to create a patch file of the changes I made. Now I want to apply those changes with BC4 to LKS2. I start out with a folder compare with LKS1 on the left side and LKS2 on the right side. Now I do a "Tools" "View Patch..." and I select the patch file from LKS1. The changes shown on the left folder don't reflect the changes in the patch file. Also, some of the changes are already applied to the right side. I want to see the patch file changes on the left folder and I want to manually apply those changes to the right side.

                Comment


                • #9
                  Looking at this again, it seems that the apply patch only displays the patch file as two panels, with the left panel showing what is removed and the right panel showing what is added. This is completely useless to me. I would like to apply this patch to a folder so I would like to see the patch in the left panel and the right panel should show the folder with all files that will be modified. Left panel should be load patch and right panel should be load folder. If I select a file, then the left panel should show the patch lines that will be added or removed and this should be aligned with the contents in the right panel. This should look exactly like a text compare with copy-to, align, etc. When the patch applies cleanly, the text from the patch should line up with the text from the right panel. If there is a patch conflict, then the text from the patch will not line up with the right panel. The text from the patch should be aligned with the text on the right panel as specified by the patch line number.

                  Comment


                  • #10
                    Thanks for the description of how you want to use it. The View Patch functionality has only been designed as a read only patch viewer right now, and the "Apply" command is a simple wrapper that handles calling the command line patch utility for the entire patch. I don't know that we'll get it into the initial v4.0 release, but I'll add a feature request for making the apply step more interactive; the way that you describe it sounds like a good way to handle it.

                    EDIT: I should add that we'd probably have the target folder on the left side, though, since that's the way the patches are pulled apart right now, and generally how we have our version control command lines set up (so newer files are on the right).
                    Last edited by ZoŽ; 14-Feb-2014, 06:38 PM.
                    ZoŽ P Scooter Software

                    Comment


                    • #11
                      Why won't you allow the user to swap left and right panels just like you do for folder compare or text compare? The Linux kernel developers are going to go nuts when they see this feature in BC. This is a feature we have been wanting for a long time. Eclipse kind of does this, but it is really slow and doesn't always work. Thank you for all your help.

                      Comment


                      • #12
                        I was mostly thinking about how it would be presented and whether it would need an option or not. For a standard 2-way compare you can control it by changing the order of the command line arguments, but a patch always has an implied order because they're explicitly adds and deletes, so we need to pull it apart in a consistent manner. Right now that's older on the left, newer on the right, which matches the order that version control systems usually launch BC with. If the target for the Apply is on the left nothing really changes, and if it's on the right that's basically reversing the patch. To have it work the other way would require some sort of "Put newer file on the left" option, either in Preferences or when you open the patch, and we've been trying to cut down on the number of preferences where they're not strictly necessary.
                        ZoŽ P Scooter Software

                        Comment


                        • #13
                          I think you are trying to do too much. Keep it simple. Simply align the line numbers from the patch in the left panel to the line numbers of the file on the right panel. Color the adds and deletes in the patch. Nothing more. Now it should be up to the user to make decisions of how to apply the patch using the standard copy arrows. If the patch will apply without conflicts, the "patch delete lines" should align with the same text in the right panel and the "patch add lines" should see a space on the right panel. If the patch doesn't apply cleanly, this won't be the case and the uses will have to manually align the patch sections before applying the changes.

                          Comment


                          • #14
                            Thanks for the additional feedback. I'll add these notes to our tracker entry on the subject.
                            Aaron P Scooter Software

                            Comment


                            • #15
                              This is a very important feature and I would like to know if you are planning on adding this anytime soon?

                              Comment

                              Working...
                              X