Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Svn for (real) dummies

  1. #1

    Default Svn for (real) dummies

    Dear all,
    Me and my 3 other colleagues we have to write some matlab code for one of our projects.
    First is that I am really bad about programming
    Second I would like to have a decent way to exchange code between me and my colleagues.

    Usually people refer me to version control systems. There are still so many ideas that I do not understand like commit, checkout which seems to be also the case with my colleagues. That's why we never used such a thing.

    In my ideal world I would like to be able to upload my latest code so my colleagues to have the latest version available.

    Could you please suggest me of such an easy system (that can work with two up to three left clicks?). Could you also give me an easy to read tutorial?

    I would like to thank you in advance for your help

    Best Regards
    Alex

  2. #2
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: Svn for (real) dummies

    Sorry for my stupid answer, but what about not using a version control
    system at all if neither you nor your colleagues feel comfortable with it?
    If it is just about sharing code with your coworkers why not simply using a
    shared network folder or if you have the need to do it over the internet set
    up simply a ftp server (or use one your provider gives you) for sharing the
    code and accessing the files.

    --
    PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.1 | GeForce
    9600 GT | 4GB Ram
    Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
    ION | 3GB Ram

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,483
    Blog Entries
    2

    Default Re: Svn for (real) dummies

    Besides what Martin suggests,
    It starts with understanding <why> version is important...

    It's the ability to contribute changes while preserving what existed before. If you over-write a file with changes, typically prior versions are lost, so if you add something that doesn't work and you need to revert you could be toast.

    Considering that, typical version control systems efficiently manage changes and present an easy way to manage changes but if your project is simple enough and few people in your team then version control might be managed another way... like simply placing new code in its own folder named in a useful way. Just don't over-write anything that already exists and save stuff in a way that makes sense to you.

    Tony

  4. #4

    Default Re: Svn for (real) dummies

    Dear all I would like to thank you for your answer!

    I have started today reading again about this svn functionalities and I found a list of questions that made the use of such systems so bizarre to me.

    1. In the manual I am reading it says that the check-out is something that you use before start writing code so to download the latest of available code. Let's say that I am editing a file called myfile.m and accidentaly(or not) I press check-out without commiting anything. Would myfile.m be replace by the file that was before on the server? Will I lose that way any changes I made in myfile.m?

    2. Why I need svn update? Is not check out the same thing? What are the differences between the two?

    3. One more think that is not very easy for me to comprehend is the notion of a revision. In my manual says that after some time it might be that every single file has it own revision number. In that case if I have three files one can have revision number of 2, the other one of 15, and the third one of 1. How are you sure when you right code that you do have the latest version?

    4. Let's say that two users 'download' the latest version of the file called myfile.c. Then both of them have the latest version of the same file.
    User one: write some code on the file
    and
    User two: renames the file to myfile2.c
    and both users at the same time do check-in/commit. What will happen to this file? How the administrator or the coding coordinator can afterward merge these two files?

    5. How can the users at the same time have their one local working space with trash files, demo versions and at the same submit only one file which might be their own task to do without filling in the server with many trash files?

    I know that this might be really time consuming for your to help me understand all these so please reply as many as you want without getting over your time limitations.

    Best Regards
    Alex

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Svn for (real) dummies

    1. No, it will tell you that there is an existing file of that name in the directory and refuse to check out the one from the repository.

    2. If you have checked out before, you will not be able to checkout a second time because there will be metadata in a hidden directory called .svn saying that you have already checked out. You can only update. In short the first time you checkout, subsequently you update.

    3. In SVN the revision number identifies states of the entire project. The latest version of each file corresponds to one of the revisions. If you just do a checkout or an update, you will automatically get the latest version of each file. You don't have to worry about revisions unless you are looking for a particular snapshot.

    4. User 2 will not be able to commit myfile2.c because it's now a different name that does not exist in the repository. However if user 2 does not rename the file before editing, and say user 1 commits first (one of them has to be the first, it can never be simultaneous, the system will break the tie), then user 2 will get told that the file changed in the repository. User 2 has then to do an update, and this update will merge the user 1's changes and the user 2's local changes. There may be conflicts, which will be flagged in the file, and user 2 has to resolve them. Otherwise if the changes don't conflict, e.g. they are in separate areas of the file, then the file will be consistent and user 2 can commit successfully.

    5. As explained above, commit will not send all files in the directory. Any file that you want to commit but does not exist yet in the repository has to be added first with svn add. So the presence of junk files in the working directory will not affect commits.

  6. #6

    Default Re: Svn for (real) dummies

    Thank you very much for your help.
    I will have to read your answer again (but will do it later as I am really busy right now).
    Can you also suggest me a nice gui for openuse and one for windows (for windows colleagues?)

    Easy to use is the best one!
    Cheers

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Svn for (real) dummies

    I don't usually use a GUI, but if you use Eclipse, there is SVN support.

  8. #8
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: Svn for (real) dummies

    ken yap wrote:

    >
    > I don't usually use a GUI, but if you use Eclipse, there is SVN support.
    >

    Not really good for matlab scripts, which were mentioned in the beginning.
    A plugin for windows explorer exists for subversion. Google for subversion
    and tortoise.
    For kde there is kdesvn.

    --
    PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.1 | GeForce
    9600 GT | 4GB Ram
    Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
    ION | 3GB Ram

  9. #9
    Join Date
    Jun 2008
    Location
    /dev/swat
    Posts
    1,181

    Default Re: Svn for (real) dummies

    Tortoise for windows
    Kdesvn for Linux

    software.opensuse.org: kdesvn

    Regards
    Linux[openSUSE, KDE], PHP, MySQL, Wordpress, Tech News, etc :
    http://anl4u.com

  10. #10

    Default Re: Svn for (real) dummies

    Dear all,
    I would like to thank everyone for your answers that made it more clear.

    I believe that in my/our case I do not need to create (at least for now) any branches. I can start with my colleagues only with one repository and each one updating his own files.

    1. Could you please help me understand how I can have a shared folder in the svn and each one to submit his code inside?

    This folder will be used as the current development code. I also believe that would be good to have also one more 'folder'(?) to copy inside files that are in a less stable status?
    2.Should that be done by snv copy or that is another branch?

    3. If I got it right HEAD is the collection of the latest version(revision number) of files stored. Does the head refer only to the svn server or it might be also to the clien'ts working dir?

    4. HEAD and BASE might be sometimes the same? For example after a svn update?

    5. What is the difference between Commited and Base? Is Commited<=Base ? Usually is a revision smaller than Base and in the best case they have the same revision number?

    6. Lets say that I have one folder in my svn server and I create a branch. Immediately after that the folder and the branch contain the same files. What will happen in the case I will check out both my folder and branch to the same working directory? What will happen with some many files with the same into one working local folder?

    I would like to deeply thank you again for your kindness

    Regards
    Alex

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •