Reputation: 673
I have a file named test.txt
.
When ever file conflict occurs. we get 4 files e.g.
test.txt
test.txt.min
test.txt.r1
test.txt.r2
In test.txt
we get some text like
<<<<<<< .mine
>>>>>>> .r2
So my question is that
Is there a way to prevent user to commit the conflicted file?
I mean,
User cant commit a file containing text <<<<<<< .mine >>>>>>> .r2
User cant commit some extra files created
I am using tortoiseSVN with visualSVserver in Windows
Upvotes: 0
Views: 121
Reputation: 29715
The Easy way:
This problem seems easily solvable by software(e.g. a hook script), however the real problem will be worse(believe me, I implemented it once for a customer!). Your people will start to remove the conflict markers and will rename these files to unmatch your regex in your hook script resulting in flooding your repository with all kind of conflicted files. Worse than that: Nobody can reconstruct the underlying conflicts as the conflict markers are gone!
The correct way:
You should explain your users how this conflicts occur. If they are happening very often, usually another (external) problem is responsible(bad software design, no team communication, etc.). SVN forbids to commit a conflicted file. You should show how to resolve this conflict. In standard SVN usecases conflicts are not a big issue (except on merging)
Upvotes: 1