Announcement

Collapse
No announcement yet.

Want to output conflicts and additions.

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

  • Want to output conflicts and additions.

    I am running

    Code:
    ~\code\project\version_123.2\file_1.ada ~\code\project\version_123.3\file_1.ada /automerge /force /mergeoutput=outputFile.txt
    However this will only mark the confits of file_1 (version 123.2) and file_1 (version 123.3).

    I would like the outputFile.txt to mark the conflicts as well as the additions.

  • #2
    Hello,

    The two input files should remain unchanged, and all markings are only in the generated outputFile.txt.

    You only have two input files and no ancestor above, so any aligned different lines would be Conflicts, while any orphan lines would be automerged. It sounds like you are looking for a Report rather than an automerge. You could generate one in the interface first, and if that meets your needs, create the automation.

    Load the Text Compare with your two files, then in the Session menu -> Text Compare Report, would the Patch Report or Interleaved Report layout style meet your needs? If so, you can then use bcscripting to generate the same report options with parameters as the file name inputs. For example:

    bcompare.exe "@~\bcscript.txt" "p1\file1.ada" "p2\file1.ada" "~\bcreport.txt"

    where bcscript.txt is:
    text-report layoutatch optionsatch-unified output-to:"%3" "%1" "%2"
    Aaron P Scooter Software

    Comment


    • #3
      Correct, automerge will only add to outputFile.txt if there are conflicts.

      Otherwise it outputs nothing.

      What I actually want is just a diff between version 123.2 and 123.3 output in csv format.

      Im essentially rebuilding reversion history between multiple versions of software. So I want conflicts and any additions.

      To make any difference show as a conflict in an output file.

      Comment


      • #4
        Hello,

        Hmm, I don't think automerge can be used in that way. You do want to use a scripted report, but we don't have "csv" as one of our output types. If you are parsing a report in order to generate your own data with your own external script, I think the XML output report is the one you would want to use.
        Aaron P Scooter Software

        Comment


        • #5
          Your first suggestion was spot on. Thanks.

          Is there a place for the documentation for beyond compares script api?

          Or is it in the manual somewhere and I have missed it.

          Comment


          • #6
            Oh yes, no problem.

            Scripting help is in BC4's Help menu -> Contents (F1), and in the Using Beyond Compare -> Scripting chapter.
            We also have an online version: https://www.scootersoftware.com/v4help/scripts.html

            There is also a Scripting Reference chapter at the bottom of the contents list.
            Aaron P Scooter Software

            Comment


            • #7
              Does some/all of this apply to bc3 pro?

              bc3 pro windows 3.2.4(13298)

              I do believe I am version locked.

              Comment


              • #8
                Applicable, but the Help file is organized differently:
                Help menu -> Contents (F1) -> Using Beyond Compare -> Automating with script (the last subchapter listed).
                and
                Help menu -> Contents (F1) -> Scripting Reference

                I'd recommend generating the report on a pair of test files in the graphical Text Compare session, Session menu -> Text Compare Report, pick XML as the layout option and Output: Text, and Save. Try out different options in the interface to find which report the script should then generate.

                If you are version locked, you have to stay on 3.2.4, but BC3.x licenses are good for any BC3.x version, so you could ask your IT dept if 3.3.13 is ok for you to update to:
                Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. Use it to manage source code, keep directories in sync, compare program output, etc.
                Aaron P Scooter Software

                Comment

                Working...
                X