threads / discuss / 31754

In search of a version control system

Subject: In search of a version control system

## tl;dr

8 messages between Oct 8, 2012 and Oct 21, 2012.

replies: 7people: 7as markdown or json

Maurice Francois· Oct 8, 2012, 18:06 UTC · lore
Hi,
My thesis supervisor asked me to find a VCS. He wants to version-controlled all his projects.

The needs are not that big, that is to say it is academic and research projects. A project can have dozens of Word, PDF and program files (Stata do-files, SAS programs, SPPS syntaxe files and R scripts) and their corresponding log files.

Like many people, I hesitate between Git and Subversion. I like the idea of distributed version control system. But is that such a system eliminates the need for a real server ? Can we just set up a repository on one of the computers in our workplace and give access to that repository via a local connection or via a remote VPN connection ? 
We do not need to work at the same time on a file. The work is not so intense. So, is it possible to lock a file while someone work on it ?
Thanks, 

François Maurice Candidat à la maîtrise Département de sociologie Université de Montréal      

Ramkumar Ramachandra· Oct 8, 2012, 18:24 UTC · re: Maurice Francois · lore

Re: In search of a version control system

Hi Maurice,
Maurice Francois wrote:
> The needs are not that big, that is to say it is academic and research projects. A project can have dozens of
> Word, PDF and program files (Stata do-files, SAS programs, SPPS syntaxe
> files and R scripts) and their corresponding log files.

Note that Git wasn't designed for big binary files, and doesn't perform well between them.

> Like many people, I hesitate between Git and Subversion.

I honestly cannot comprehend why someone would choose Subversion over Git for a fresh repository today.

> I like the idea of distributed version control system. But is that such a system eliminates the need for a real server ? Can we just set up a repository on one of the computers in our workplace and give access to that repository via a local connection or via a remote VPN connection ?

Yes, you can have a "blessed" server, just like in Subversion. And yes, you can access it over git://, http://, https://, or ssh://.

> So, is it possible to lock a file while someone work on it ?

No, and I honestly think it's a bad idea. Read up more about Git, and try to understand how people work with it.

Ram
Matthieu Moy· Oct 8, 2012, 18:30 UTC · re: Ramkumar Ramachandra · lore

Re: In search of a version control system

Ramkumar Ramachandra <artagnon@gmail.com> writes:
>> So, is it possible to lock a file while someone work on it ?
>
> No, and I honestly think it's a bad idea.

If you work on non-mergeable files (e.g. *.doc files. There are merge tools for MS Word and LibreOffice, but my experience with them was not really pleasant), then file locking is indeed not such a bad idea.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
David Aguilar· Oct 9, 2012, 03:19 UTC · re: Matthieu Moy · lore

Re: In search of a version control system

On Mon, Oct 8, 2012 at 11:30 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 9 quoted lines
> Ramkumar Ramachandra <artagnon@gmail.com> writes:
>
>>> So, is it possible to lock a file while someone work on it ?
>>
>> No, and I honestly think it's a bad idea.
>
> If you work on non-mergeable files (e.g. *.doc files. There are merge
> tools for MS Word and LibreOffice, but my experience with them was not
> really pleasant), then file locking is indeed not such a bad idea.
gitolite to the rescue:
http://sitaramc.github.com/gitolite/locking.html

If you want to setup a git server, look at gitolite. It's really easy and slick.

I would advise against the file locking, though.  You ain't gonna need it ;-)
-- 
David
Matthieu Moy· Oct 9, 2012, 05:58 UTC · re: David Aguilar · lore

Re: In search of a version control system

David Aguilar <davvid@gmail.com> writes:
> I would advise against the file locking, though. You ain't gonna need
> it ;-)
What do you suggest to merge Word files?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Drew Northup· Oct 21, 2012, 12:20 UTC · re: Matthieu Moy · lore

Re: In search of a version control system

On Tue, Oct 9, 2012 at 1:58 AM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 6 quoted lines
> David Aguilar <davvid@gmail.com> writes:
>
>> I would advise against the file locking, though. You ain't gonna need
>> it ;-)
>
> What do you suggest to merge Word files?

If the files are in the DOCX format you can just expand them as zip archives and diff what's inside of them. The text in particular is stored as XML.

-- 
-Drew Northup
--------------------------------------------------------------
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Nguyen Thai Ngoc Duy· Oct 21, 2012, 13:16 UTC · re: Drew Northup · lore

Re: In search of a version control system

On Sun, Oct 21, 2012 at 7:20 PM, Drew Northup <n1xim.email@gmail.com> wrote:
Show 12 quoted lines
> On Tue, Oct 9, 2012 at 1:58 AM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> David Aguilar <davvid@gmail.com> writes:
>>
>>> I would advise against the file locking, though. You ain't gonna need
>>> it ;-)
>>
>> What do you suggest to merge Word files?
>
> If the files are in the DOCX format you can just expand them as zip
> archives and diff what's inside of them. The text in particular is
> stored as XML.

An XML diff means nothing to a regular user, and manually "merging" this way can produce unreadable Words files. So no, it's still not an answer.

-- 
Duy
Sitaram Chamarty· Oct 21, 2012, 13:25 UTC · re: Drew Northup · lore

Re: In search of a version control system

On Sun, Oct 21, 2012 at 5:50 PM, Drew Northup <n1xim.email@gmail.com> wrote:
Show 12 quoted lines
> On Tue, Oct 9, 2012 at 1:58 AM, Matthieu Moy
> <Matthieu.Moy@grenoble-inp.fr> wrote:
>> David Aguilar <davvid@gmail.com> writes:
>>
>>> I would advise against the file locking, though. You ain't gonna need
>>> it ;-)
>>
>> What do you suggest to merge Word files?
>
> If the files are in the DOCX format you can just expand them as zip
> archives and diff what's inside of them. The text in particular is
> stored as XML.

You also need a merge driver that at least splits the "all in one single very very long line" XML into different lines in some way. I don't think git can merge even text files if everything is on one line in each file. And even if you do this I don't think the result will be a valid ODT etc file.

All in all, I prefer the locking that David mentioned [1]. And if your users cannot be trained to check first (as that URL describes), then you probably have to use a CVCS that supports some stronger form of locking.

[1]: http://sitaramc.github.com/gitolite/locking.html

← back to recent threads