Announcement

Collapse
No announcement yet.

Better BC4/GIT integration?

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

  • Better BC4/GIT integration?

    So, following the instructions here http://www.scootersoftware.com/suppo...vcs#gitwindows I can invoke get diffs via git difftool and git difftool -d

    BUT (big but) the experience is pretty awful for the thing I do most often - eyeballing/fixing pre-commit.
    git difftool" is useless for any but the smallest changes - the app pops up a new window for each file and there's no navigation.
    "git difftool -d" looks a bit better - but there's no way to edit the local files (they're temp files). Even running with --symlinks as admin didn't seem to do anything different (maybe I'm doing something wrong here?, if the right pane was local files, this wouldn't be bad).

    Something close to bc patch mode would be ideal, alas git diff | BCompare.exe - /fv="Text Patch" gives "File not found stdin://". Of course I can git diff to a temp file and open that, but again, I would be left editing temp files instead of the originals.

    How can we get a better out of the box experience? I don't think we should need to reinvent the wheel here with auxiliary scripts etc. If git can't be taught to do it, then perhaps bc can instead? Something like
    bdiff git <folder> (which would do the pseudo command "git diff <folder> | bcompare --patch-mode --rhs=<folder>")
    Even better if it could detect the source control system "bdiff ."

    Stephen.

  • #2
    Hello,

    Git difftool -d shows temporary paths, but edits to the local side update the current/local file as well once the BC4 window is closed. It is under Git's control to generate temp files of both sides and update after the save. We support a /vcs variable to improve readability and show different text in the path instead of the literal c:\...\temp\ path, if Git adds support to output that text as a parameter.
    Aaron P Scooter Software

    Comment


    • #3
      Hi stevek,
      I use git difftool -d all the time, and it works. Although right folder points to a temp file, files are really symbolic links to your local folder, so any modification is reflected in your local folder.

      Make sure you have 'Follow symbolic links' set in your bc under 'Session Settings' -> 'Handling' tab.

      Comment


      • #4
        Originally posted by Aaron View Post
        Git difftool -d shows temporary paths, but edits to the local side update the current/local file as well once the BC4 window is closed.
        Thanks! I had no idea that git would copy the changes from temp back to the originals on exit!
        I still haven't gotten symlinks to work (on windows, even as admin and --symlinks flag) but this copy back is good enough.


        So, is there any way to get similar behavior from dumber source control systems which we occasionally encounter? For instance it would be great to be able to "some_vcs diff <folder> | bcompare --patch-mode --rhs=<folder>" which would allow edits to files in <folder>

        Stephen.

        Comment


        • #5
          It's up to the source control system to expose the files. Git does this, but many others do not allow it, and store the files in a proprietary manner than can't be explored.

          Symlinks are a Folder Compare Session Setting in the Handling tab. We can either load the symlink or its intended target by enabling Follow Symbolic Links. Session Settings are only for the current view, so this will be disabled for each new Folder Compare unless you update the default value. This is done by the bottom dropdown option "Use for only this view" -> "Also update session defaults", or performing the edit on the Home screen's saved Sessions list, expand the New folder, and edit the default Folder Compare session.
          Aaron P Scooter Software

          Comment

          Working...
          X