Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8986297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:30:57+00:00 2026-06-15T21:30:57+00:00

Within a pre-commit script, is it possible (and if so, how) to identify commits

  • 0

Within a pre-commit script, is it possible (and if so, how) to identify commits stemming from an svn merge?

svnlook changed ... shows files that have changed, but does not differentiate between merges and manual edits.

Ideally, I would also like to differentiate between a standard merge and a merge --reintegrate.

Background:

I’m exploring the possibility of using pre-commit hooks to enforce SVN usage policies for our project.

One of the policies state that some directories (such as /trunk) should not be modified directly, and changed only through the reintegration of feature branches. The pre-commit script would therefore reject all changes made to these directories apart from branch reintegrations.

Any ideas?


Update:

I’ve explored the svnlook command, and the closest I’ve got is to detect and parse changes to the svn:mergeinfo property of the directory. This approach has some drawback:

  1. svnlook can flag up a change in properties, but not which property was changed. (a diff with the proplist of the previous revision is required)
  2. By inspecting changes in svn:mergeinfo, it is possible to detect that svn merge was run. However, there is no way to determine if the commits are purely a result of the merge. Changes manually made after the merge will go undetected. (related post: Diff transaction tree against another path/revision)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:30:58+00:00Added an answer on June 15, 2026 at 9:30 pm

    I’ve eventually resorted to a non-ideal solution, i.e. detecting changes in the svn:mergeinfo property in the top directory of the changes tree (implemented in SVNTransaction.is_merge_operation()).

    We cannot differentiate between merge-only commits and commits that also include additional changes. This means all changes that occur under that tree will go undetected if committed along with a merge. A possible solution might be to diff the transaction tree against the merge source but I have not figured out how to achieve that yet (this will also need to take into account changes as a result of conflict resolutions).

    It also cannot differentiate between a merge and a merge --reintegrate.

    Other limitations include the reliance on svn:mergeinfo which is user-modifiable and not used in older version of subversion.

    The commit scripts in question is meant as a gentle reminder to flag commits that go against project guidelines rather than an access control mechanism, so the limitations listed above is not a show-stopper. However, I’m still on a lookout for improvements. Comments and further suggestions welcome.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to send pre-compressed files that are contained within an EARfile? More
I have a pre tag within my page that contains quite a bit of
Within a for loop, I'm using the following code to convert from one date
Is it possible to add a feature to record the game play within your
Possible Duplicate: Mixing C pre/post increment/decrement with Objective-C dot operator works? I'm debugging a
I have an unmanaged DLL that gets called from .NET with pre-allocated buffers to
I have a pre-populated sqlite database and I need to attach this within my
In IE7 multiple line breaks (using <br /> or <br> ) within a <pre>
i have some text files in a pre-defined directory, the files end with *.edi
I'm working on generating reports for data contained within a large pre-existing Access database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.