Announcement

Collapse
No announcement yet.

Get Action in pre-commit hook

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

  • Get Action in pre-commit hook

    Hi,

    I need Action(A or M) in pre-commit hook.

    I going to check file content using svnlook cat, if file contains certain string(some ******) i need to block the commit if it is add operation(Action). otherwise do nothing.

    thanks.

  • #2
    thanks,

    i have found the solution by using svnlook changed cmd

    i have another question how can i checkout the single file from repository ???

    like svn co URL(Url of particular file not a path) path(path to localfile)

    thanks,

    Comment


    • #3
      Originally posted by satheesh View Post
      thanks,

      i have found the solution by using svnlook changed cmd

      i have another question how can i checkout the single file from repository ???

      like svn co URL(Url of particular file not a path) path(path to localfile)

      thanks,
      You cannot check out a single file from the repository. The smallest unit that can be checked out is a directory.

      You can get a file from the repository with svn cat or svn export, but it will not be linked back to the repository in a meaningful way.

      Comment


      • #4
        If you want the file contents associated with the transaction in a pre-commit use "svnlook cat -t TXN"

        Comment


        • #5
          Thanks of quick reply,

          Is it possible to --bypass the hooks while committing the file using svn commit ???

          Comment


          • #6
            Originally posted by satheesh View Post
            Thanks of quick reply,

            Is it possible to --bypass the hooks while committing the file using svn commit ???
            A hook script cannot be bypassed unless it is coded to exit without doing anything under specific circumstances.

            Comment

            Working...
            X