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.


SVN (Log Status Diff)

SVN View the change:

In order to view the change made to the repository you can check with the GUI and Cmd.

You can also compare the difference between your working copy and Repository.
Scenario:  You made some change to cast in the crew…..

SVN status : It is to check the changes made to the particular file.

SVN diff: It is compare the file with repository. With the working copy to the repository.

SVN log: It is to get the history of the changes made to the particular file or to the repository.

Scenario:  Consider the director of Game of thrones decided to make some changes to the script according to the book of Game of thrones. So he called George to make some major changes to the script. So George will check his Book and compare that with the TV series script.

Consider in this scenario where the book is the major repository and TV series script is the working space. George will first check the status of the TV series what all the changes were made to the TV series script and then he compares that with the book of Game of thrones which is the acting Repository in this scenario.

SVN log is to check the history of changes made to the particular file.
Consider in some episode where some particular scene of Game of thrones took 14 Script modulations, then if you check the script file then if you check the log then it will display 14 logs including the director who made the change J  as well as the date and time the commit made.


SVN cmd:






After committing the file type the command;

Svn diff (filename) to view the difference you made to the file.
Comparing with your working copy to the previous commited version.

Svn status: To check what all the changes are yet to be commited to the repository 




SVN GUI 






SVN Log:

If you need to check with the history of changes made to that file or to the repository you can see the log command.



SVN Log GUI;


The only thing with SVN is when you want to view the log immediately after committing the file, it will show the last commit and not the recent commit, in order to overcome that you have to update the SVN then you have to try it again.


The reason is that all the Subdirectories in the repository is considered as objects. So SVN will try to remember the version number from your working copy. So if you try to make some changes to the directory (Ireland) then the SVN clearly knows you have made some changes to the directory Ireland and committed to version 2 but the working copy is still at version 1 so once you update your working copy you can able to view the latest svn log.



svn commit GUI

SVN commit GUI:

Right Click --> SVN commit




Give some comment in the comment box so that it will be easy to monitor





Svn commit cmd

Svn commit cmd:


After stealing the documents from your office, you have to go through and modify some changes to collapse your rival or manager. L since this example is not ethical. Let’s change the scenario to different view .



 You modified some changes to your Episode. Yes we are now taking about Game of thrones. Suppose you are the director of the serial and you want to make some changes then you will re-take that particular scene where you feel that can be taken with much better angle. So you make some changes and update it back to your local folder. In this Example lets go back to the example like Scotland is the folder and we made some changes to the file called Lannister.





Use the command: svn -m "commit" to commit your message to the repository.