Is there a way to force opening file/folder as read-only??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wayi
    New User
    • Jun 2019
    • 1

    Is there a way to force opening file/folder as read-only??

    Is there a way to force BC3 to open all folders and files as read-only? Our project uses BC3 for code reviews, but we don't want to have the files changed accidentally during the review.

    I know a workaround would be to copy the files to another folder and make them read-only there, but I was hoping there was a session setting I could use instead.
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    A session can be saved with Disable Editing in that session's Session Settings dialog -> Specs tab. Or if launching from a command line, you can use /ro, or /ro1 or /ro2 (left and right) to launch in a read only mode.
    Aaron P Scooter Software

    Comment

    • ilyagr
      Journeyman
      • Jan 2023
      • 10

      #3
      First of all, this is very helpful, thank you!

      As a feature request, could Beyond Compare automatically disable editing for read-only files? Obviously, there would need to be an option to re-enable editing.

      The context is that I'm working on a VCS called `jj` that carefully marks the files that should not be edited as read-only before calling a merge tool for conflict resolution or diff editing (e.g. when you want to split a commit into two). I'll put a config using the `-ro1` and `-ro2` options in the wiki for `jj`, but it'd be nice if `bcompare left_side_dir right_side_dir` just worked perfectly out of the box. (This is the command `jj` would use for diff editing without a config)

      Comment

      • ilyagr
        Journeyman
        • Jan 2023
        • 10

        #4
        Here is the config for `jj` I put into the wiki I promised above. It seems I'm not allowed to edit that post.

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 15997

          #5
          Hello,

          If files are marked as read-only, then editing is not disabled but if you attempt to Save you'll get an extra warning prompt indicated you are attempting to save over a read-only file. The /ro parameters are a pretty common method of handling this for VCS solutions when one side is known to be protected; is there something I'm missing where this wouldn't be a desired setup solution?

          Your post was under review. It's also a reply to an older BC3 thread, while this new tool seems like it might benefit from being in the BC4 forum. If you'd like me to move it, or if you wanted to re-post over there (leaving this one here for anyone else that finds it, much like you found it), that's totally fine. Just let me know.
          Aaron P Scooter Software

          Comment

          • ilyagr
            Journeyman
            • Jan 2023
            • 10

            #6
            Sorry for the late reply. I think the /ro flags worked out for me in the end, thank you again!

            I just posted a different post about this tool in the BC5 forums, so I guess BC4 forums might end up left out.

            Comment

            Working...