Reputation: 22486
svn 1.6.9
I have my development (dev) machine and a target testing machine (test)
However, If I make some changes on my dev machine, that should cause a conflict on the test machine when I update, as I have modified the same line code in the same file.
example
(dev)
main.c
void get_device(int device_id);
(test)
main.c
void get_device(int device_id);
Both have exactly the same. Now when I change the prototype of dev to this:
char* get_device(int device_id);
Then commit that change.
When I update on the test machine. Shouldn't it not cause a conflict as I have modified the same line of code? All I get when I update is the following:
U main.c
Should it not show me that there is a line of code which is in conflict? Instead of just updating the line of code?
However, if I make some minor changes to the test machine, then I try and commit. Then it fails to commit. Then when I try and update it will then show me the conflict for changing void to char* in that line.
It seems to me if I change the same line of code, I want to be notified of any conflicts when I try and update.
Many thanks for any suggestions,
Upvotes: 0
Views: 572
Reputation: 9592
You can check for changes in the repository with
svn status --show-updates
The command does not alter your working copy.
You may have a look at the svn documentation regarding file states. A conflict only occurs if svn is not able to merge changes.
Upvotes: 2
Reputation: 7961
If SVN is able to merge changes, it won't cause a conflict. Conflicts usually arise when SVN does not have a good way of merging changes during an update, especially multiple changes to the same code at the same time.
In your case, a change was made in one place, and then updated in the other. This is not a conflict scenario.
Upvotes: 2
Reputation: 43
This is expected (no conflicts, just update) if the main.c on the test machine is the same as the BASE. When you do 'svn update' on test, svn first checks if there is any local changes to main.c by comparing it against the BASE -- conflicts only occur when the local copy and HEAD make changes to the same part of the file (when comparing against the BASE).
Hope this helps.
Upvotes: 1