git dif, cvs diff, svn diff etc

git dif, cvs diff, svn diff etc

13
Basic UserBasic User
13

    Mar 06, 2010#1

    I'd love it if I could do something like this:

    Code: Select all

    git diff myfile.cpp | uc
    
    Of course that doesn't work, but I was wondering if UC/UE have a way to make use of a diff from SCM software and put it into the context of the local file.

    i.e. indicate how the copy in the repository differs from the local copy.

    I'm not keen on buying studio for this... it seems excessive for a requirement which UC ought to handle, and I've shelled out too much money on infinite upgrade UE and UC licenses.

    236
    MasterMaster
    236

      Mar 07, 2010#2

      Why don't you use UC as your diff tool in SVN? Check the help file (search for "subversion") about how to configure UC to integrate with SVN. I don't know how git would need to be set up. I myself use TortoiseHg, and I haven't yet found out (nor looked much) how to set up the usual three-way compare this way, but perhaps that's a cleaner solution.

      13
      Basic UserBasic User
      13

        Mar 07, 2010#3

        Oh right... they all seem to have external difftool support.

        I'll pick through the thread at http://stackoverflow.com/questions/7804 ... 667#783667 for git and dig through the CVSNT documentation or perhaps revisit using WinCVS. Unfortunately I need all three SCMs for different projects.

        That's a partial solution for me.

        In the git world where everyone branches off with their own repositories and submit diffs to patch into the main branch, where applicable, it would be ideal if UC could work from the actual diff format, which I assume is similar to that of SVN and CVS. I'd (say) have the master branch and then someone submits some clever diff patch which I merge into the master branch using UC to see and merge the differences.

          Mar 08, 2010#4

          As an external diff tool, UC is very nice indeed when there are lots of differences to compare. It does mean replacing Cygwin's CVS with CVSNT and changing the protocol in CVS Root entries from :extssh: to :ssh:, but that's OK with me. I expect it will be a similar deal with SVN, which, superior though it is, is used for less SCM than CVS in my world. I maintain a lot of legacy systems.

          However, it would be really nice if UC could derive a comparison from the diff output generated by the SCM server. Command line fans like me aren't all that keen on waiting for a full file fetch, and for Tortoise windows to load and then IDM UltraCompare windows to be loaded up for looking at small differences. I think I'll keep using the command line for small diffs.

          If UC could be made to make sense of server-generated diffs, and if diff outputs from CVS, SVN and Git have a similar format, which appears to be the case, UC could also be a great merge tool for diffs from Git as well as being an improvement for small comparisons shown on STDOUT.