resolved SVN Command
How to use resolved SVN (Subversion) Command in Linux / Windows?
Explanation
resolved command is used to remove 'conflicts' in the working copy files or directories. Conflict arises when two or more users attempt to make changes in the same file.
Usage:
svn resolved <filename>
Example:
- Look at the example of svn resolved,
Consider that,you have edited the file 'example.php', whic was already edited and commited by another user in another revision.
Now if you update the changes into repo, you will receive an error message,
svn update
Output:-----------------------------------------------
Conflict discovered in 'example.php'.
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: p
C example.php
Updated to revision 5.
Summary of conflicts:
Text conflicts: 1
-------------------------------------------------------
It shows that file 'example.php' has conflict.
where,
(e) edit - the file will open to edit
(df) diff-full - shows the diff between the versions.
- Now you can determine the conflicts of the file using the following command,
more 'example.php'
Output:-----------------------------------------------
test
for
<<<<<<< .mine
resolved
=======
Svn Test
>>>>>>> .r5
-------------------------------------------------------
-
Now you can resolve conflicts of the file using the following command,
svn resolved example.php
It will merge the changes done by another user and update in to the repository.
- Now you can commit the file using the command,
svn commit 'example.php' -m update
Output:-----------------------------------------------
Committed revision 7.
-------------------------------------------------------
Result:
From the above cmd, the conflicts in the file 'test1.txt' will be removed and the file will be ready to commit with our working copy.