Thoughts on using svn, git, and hg

Source: Internet
Author: User
Use svn, git, and hg-Linux general technology-Linux programming and kernel information. The following is a detailed description. A strange problem encountered in the company: Both TortoiseSVN 1.4.6 update and checkout fail, and the same is true for directly using command line svn. The error information is completely unsuggestive and has been tossing for nearly two hours, in a directory on the server, there are two files with the same name but different cases. This is not allowed in Windows. Send an email to the Subversion and TortoiseSVN email lists. The reply is that you can see whether a patch is provided. You have read the Subversion source code a little before and are very disgusted with its lengthy and tedious code, this time I looked at it with a hard head. The Code of checkout subversion and tortoisesvn took more than a day and found that compiling on Windows was very troublesome. I still needed VS 2008, after downloading the source code with apt-get source On Debian and compiling a debug version, gdb has spent three or four hours trying to figure out the implementation path. The Code architecture in it is so amazing that it is hard to understand, maybe there is a document description, but it cannot be found.

Yesterday, I began to write the idea tool, used git or hg to manage the configuration files in the/etc and HOME directories, and found many nuances between the two. Because it is a shell script, it is very dependent on the command return values, however, git status returns 1 if there are no dirty files, and git commit-a and git commit return 1 if there are no dirty files, which is completely different from Perl's "try to execute" style, then we found that git ls-files -- modified only showed the modified files, excluding the newly added files. We didn't understand how to ensure that git commit does not report an error. If you add a file that has already been added to hg, an error is reported. In most cases, the return value of hg is zero.

More and more profound understanding of git's unique style, add is to add data rather than record file names, so that the overhead of commit is dispersed in the process of continuous addition for a long time, this improves the commit efficiency, but adds is cumbersome. In addition, git commit-a cannot be followed by file parameters, while git commit submits content recorded in index, therefore, it is impossible to submit some files simply * completely *. It is indeed a tool for the sake of integrator.

Depressed, all VCSes sucks, these suck more!

Midea program:
Concise: the code is few, the logic is simple, the algorithm is refined, and a program only does one thing, only the necessary functions-it seems like impossible mission.
Consistent: the prompt information is consistent, and the UI is consistent.
Fault Tolerance: The program is very stable and can adapt to various adverse situations. In C, the program can only achieve false stability through long patching.
Efficient: as efficient as possible.

Briefly comment on several version management tools:
CVS and VSS: there is no change set concept, so you can rest in peace.
GIT: a complex UI with advanced ideas
SVN: slow, rapid code library expansion, small client problems, and confusing error information
Mercurial: also tends to be complicated
Bazaar: Weird UI
Darcs: slow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.