Announcement

Collapse
No announcement yet.

Linux - Pre-commit hook for to compare Branch vs trunk before commit to Branch

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

  • Linux - Pre-commit hook for to compare Branch vs trunk before commit to Branch

    Hello,

    I have a requirement to commit the changes first to trunk and then to Branch in the below 92) scenarios. I need shell/Linux script for this.

    1. While add/commit new file to the branch before committing to the trunk
    2. Changes to the existing file and try to commit to the branch (before commit to the trunk)

    Fail the commit in the above 2 scenarios and display user friendly message to the user to commit to the trunk first and then Branch.

    Thanks,
    Sri.

  • #2
    We're not a script-works. We can help you understand what you need to do but then you need to write the scripts yourself.

    And, FWIW, spamming the same request across multiple postings won't help either so please don't do that. It will get you banned.

    Comment


    • #3
      Sorry and thanks for your reply DougR. I know Linux but beginner for the svn and it's commands.

      If you can guide me how to proceed with that will be great, thanks.

      Comment


      • #4
        First, you're looking at writing a "pre-commit" hook. If you're on Linux that makes it a lot easier than Windows - nice.

        Google around looking for examples of "pre-commit" hooks. Also, look into the "svnlook" command to see what it does - you're going to need it.

        One good article that I found quickly: [URL]http://wordaligned.org/articles/a-subversion-pre-commit-hook[/URL]

        Lots of good info out there already.

        Comment

        Working...
        X