Sunday 7 February 2016

Svn switch

SVN switch;

Modification in Final/Northern Ireland/ then svn switch GameofThrones/Ireland will update the changes From Final/Northern Ireland  to  GameofThrones/Ireland.



Svn Merge

GUI:



SVN Merge CMD:

Merging the file from Gotwc/Moroco/Dragons.txt to Gotwc/Final/Moroco1.0/Dragons.txt




SVN Branch

SVN Branch Creation


moving the files to the trunk:




SVN Branch GUI:


SVN Copy Move and Patch

Svn copy and move:

Suppose there is a situation where you want to copy the file to a diff folder then you can copy that file to the new directory.

If you want to rename a file then svn move will fetch that out.


Comparing two versions with the help of Diff command:




If you want to check svn diff for a particular file and its revision from line like 13-23 then you have to specify the filename.
Scenario: Martin Nicholson one of the Editors from Game of thrones came up with one different idea in the plot and he thought it would be better to furnish the finale episode but since he has only read-only access to the repository, he telephoned Benioff to discuss about the issue and he gave a suggestion about emailing the patch file so that he can install in his local and can view the plot modified by Martin.   


SVN GUI: Patch






SVN CMD:


svn property

SVN property:

You can also set some property to some files, if you want to monitor the files for some time being.
According to our example:
If you like to set some property for Dragons file and you would like to monitor that file.

But some property looks really cool; Just check it out with this.




Once you set the properties you have to commit them to the repository.
Please make note even the changes in the properties has to be committed to view the change in SVN.


 But some property looks fabulous with SVN it will ease our work so forget the word predicament that used earlier for some examples J
Normally this svn:mime-type is worth for two reasons:
All the binary files other than text have to be treated in a gentle manner. If you try to view diff for the binary file then it will not work properly so in this case it will just say the file has changed that’s it no additional info regarding that file. So when you’re trying to view the changes from the repository to your local it will save in a new file with .orig extension.
Secondly, when you try to view your repository in the web browser, just a click to the file then automatically subversion will verify the mime-type for that file and displays the result. If the property is not set then the image file will be downloaded to your system.
Below example for image file:







Visual SVN Server

Till now we have seen how the imaginary repositories created in the universe (Centralized) and we are trying to access by checking out. Now we are going to experience the real taste of Server and client.   

From now on we are going to see a different aspect in visualizing the concept of SVN.

Consider in the Repository we have two folders Ireland and Croatia. It’s nothing but two different spot where shooting is taking place for the episode. Final folder is not yet modified or made any changes its waiting to get merged from Ireland and Croatia.









Resolving Conflict

 Resolving Conflict:



Suppose two directors wants to change the name of the Dragons in the file name Dragons in the Croatia folder if you have noticed in all the above examples the name of the folder Croatia is written incorrectly and you know exactly what to    doJ.
 So in the Dragons file two directors posted the name of the dragons from two different locations. One director from the Scene location and another director during the discussion with the author. So you can clearly see the problem that is going to happen in the next minute when they commit the file to the repository. The one who commits the file first doesn’t experience much pressure because the second one will feel the heat J incase if both the directors changes same line that will lead to the conflict.
If incase they change the different lines then the second one can rectify the conflict by updating the repository.
In order to make this comfortable I have changed the Working copy to the name of the directors to avoid confusion.
Case 1:
Director Benioff changed the name of the dragons to
Viserys
Drogon
Rhager
Now Director Weiss is going to update his changes.





Now if you try to update Director Weiss you will be getting changes from Director Benioff as well.



Finally you will end up like this so it is your duty to make sure you contact the person in the other end to resolve the problem.  Because when you look Director Benioff  he is completely safe without any damage that’s because he is the one who committed his changes first. So SVN knows the changes made by Benioff whereas SVN thinks Weiss is trying to make some damages.




Use the command:  svn resolved Dragons.txt to intimate Benioff that his changes is also necessarily important than yours.



Now if Benioff update his working copy from another location. You can see the Dragons file from Benioff is also changed.




Now the duty of both the directors is to consult among themselves and they need to come to one conclusion, r27 is revision number. If you check the log for that particular revision you can find the user who made the change including the date as well as time and also the type of changes he made.