Hg Init: обучение работе с Mercurial (Глава 1: для тех кто работал с Subversion)

Joel Spolsky, “Hg Init: a Mercurial Tutorial (Part 1: Subversion Re-education)”, public translation into Russian from English More about this translation.

See also 56 similar translations

Translate into another language.

Participants

abronin2175 points
Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next next untranslated
1 2 3 4 5 6

Hg Init: a Mercurial Tutorial (Part 1: Subversion Re-education)

Hg Init: обучение работе с Mercurial (Глава 1: для тех кто работал с Subversion)

History of edits (Latest: abronin 5 months, 3 weeks ago) §

If you’ve been using Subversion, Mercurial is going to be confusing. This tutorial covers the biggest differences in how Mercurial works. If you’ve never used Subversion, just skip ahead.

Mercurial может казаться странным, если до этого вы использовали Subversion. В этой главе описываются основные отличия в работе Mercurial, по сравнению с Subversion. Если вы никогда не использовали Subversion, просто пропустите эту главу.

History of edits (Latest: abronin 5 months, 3 weeks ago) §

When the programmers at my company decided to switch from Subversion to Mercurial, boy was I confused.

Когда программисты в моей компании решили переключиться с SVN на Mercurial, парни, я был смущен.

History of edits (Latest: abronin 5 months, 3 weeks ago) §

First, I came up with all kinds of stupid reasons why we shouldn’t switch. “We have to keep the repository on a central server, so it will be safe,” I said. You know what? I was wrong. In Mercurial every developer has a copy of the entire repository on their hard drive. It’s actually safer. And anyway, almost every Mercurial team uses a central repository, too, which you can back up compulsively, and you can build a three-ringed security zone complete with layers of Cylons, Stormtroopers, and adorable labradoodles (or whatever your IT department requires).

Во-первых, я выступил со всевозможными глупыми причинами почему мы не должны переключаться на Mercurial. "Мы должны хранить репозиторий на центральном сервере, так будет безопаснее", - говорил я. Знаете что? Это неверно. В Mercurial каждый разработчик хранит копию всего репозитория на своем жестком диске. На самом деле это более безопасно. А еще, почти любая команда, работающая с Mercurial, тоже использует центральный репозиторий, который вы можете принудительно бэкапить, снабжать тремя кольцами охраны с цейлонами, штурмовиками и чудесными лабрадуделями (или чем угодно еще, что требует ваш IT-департамент).

History of edits (Latest: abronin 5 months, 3 weeks ago) §

“The trouble with distributed version control is that it makes it too easy to branch,” I said, “and branching always causes problems.” Turns out this was wrong, too. I was on a streak. Branching causes problems in Subversion because Subversion doesn’t store enough information to make merging work. In Mercurial, merging is painless and easy, and so branching is commonplace and harmless.

"Проблема с распределенными системами контроля версий состоит в том, что в них слишком просто создавать ветки (бранчи)", - говорил я - ", а бранчи всегда создают проблемы." Оказывается, это тоже было ошибкой. Бранчи создают проблемы в Subversion, потому что Subversion не хранит достаточно информации для того, чтобы дальнейшее объединение веток работало нормально. В Mercurial объединение веток это безболезненный и легкий процесс, банальное и безобидное событие.

History of edits (Latest: abronin 5 months, 3 weeks ago) §

— Не переведена одна фраза. abronin

Then I said, “Fine, I’ll use it, but don’t expect me to be able to figure it out.” And I asked Jacob to make me a cheat sheet listing all the things that I normally did in Subversion, and the equivalent way to do them in Mercurial.

Тогда я сказал: "Хорошо, я буду пользоваться Mercurial, но не стоит ожидать, что я способен разобраться с ним." И я попросил Якоба сделать мне список всех действий, которые я обычно делал в Subversion с указанием как сделать то же самое в Mercurial.

History of edits (Latest: abronin 5 months, 3 weeks ago) §

Now, I could show you this cheat sheet, but I won’t, because it messed up my brain for months.

Сейчас я мог бы показать вам этот список, но я не хочу, потому что это вынесло мне мозг на долгие месяцы.

History of edits (Latest: abronin 5 months, 3 weeks ago) §

It turns out that if you’ve been using Subversion, your brain is a little bit, um, how can I say this politely? You’re brain damaged. No, that’s not polite. You need a little re-education. I walked around brain damaged for six months thinking that Mercurial was more complicated than Subversion, but that was only because I didn’t understand how it really worked, and once I did, it turns out—hey presto!—it’s really kind of simple.

Получается, что если вы используете Subversion, ваш мозг... хм... как-бы сказать повежливее? Ваш мозг поврежден. Нет, это не вежливо. Вам требуется некоторое переобучение. Я пол-года ходил вокруг с поврежденным мозгом, думая, что Mercurial сложнее Subversion, но только потому, что я не понимал как Mercurial на самом деле работает. В тот момент когда я понял - вуаля! - оказалось, что все очень просто.

History of edits (Latest: abronin 5 months, 3 weeks ago) §
Pages: ← previous Ctrl next next untranslated
1 2 3 4 5 6