Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2008-01-24 06:37:29
Size: 134
Editor: JungSangil
Comment:
Revision 7 as of 2008-01-25 10:05:11
Size: 7269
Editor: JungSangil
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
머큐리얼은 초보자에게 어려울 수 있는 분산형 개발 모델이다. 이 페이지는 기초적인 개념을 설명한다.
한단계씩 따라해 보려면 ["KoreanTutorial"]를 참고하라.

''(Translations:
[:BrazilianPortugueseUnderstandingMercurial:Brazilian Portuguese],
[:ChineseUnderstandingMercurial:Chinese],
[:FrenchUnderstandingMercurial:French],
[:GermanUnderstandingMercurial:German],
[:ItalianUnderstandingMercurial:Italian],
[:JapaneseUnderstandingMercurial:Japanese],
[:KoreanUnderstandingMercurial:Korean],
[:SpanishUnderstandingMercurial:Spanish]
)''


[[TableOfContents]]

== Repository에 있는 것들 ==

머큐리얼의 [:Repository:repositories]에는 store과 함께 [:WorkingDirectory:working directory]가 있다:

{{{#!dot
digraph G {
 compound=true;
 rankdir = LR
 background="#999999";
 subgraph cluster_1 {
  style=filled;
  color="#eeeeee";
  node [shape=box,style=filled,color=lightgray];
  "rev 0" -> "rev 1" -> "rev 2" -> "rev 3";
  label = "store";
 }
 subgraph cluster_0 {
  style=filled;
  color=lightgrey;
  node [style=filled,color=white];
  edge [style=invis];
  "main.c"-> "main.h" -> ".hgignore" -> ".hgtags"
  label="working directory";
 }
 "rev 2" -> ".hgtags" [lhead = cluster_0 constraint=false]
}
}}}

store에는 프로젝트에 대한 '''완전한''' 이력이 남아 있다. 이러한 이력을 중앙 한곳에만 가지고 있는 전통적인 [:SCM:SCMs]과는 달리 모든 working directory는 이력에 대한 복사본을 쌍으로 가지고 있다. 이것은 병행적으로 개발하는 것을 가능케 한다.

working directory는 편집을 위한 준비로 특정 시점에(예를 들어 rev 2) 프로젝트의 파일의 복사본을 포함하고 있다. 왜냐하면 같이 포함되어 있는 [:Tag:tags]와 ignore files는 revision-controlled이기 때문이다.

== 변경사항 Commit 하기 ==

[:Commit:commit]을 할때, working directory의 상태는 새로운 [:Revision:revision]으로 기록 되어진 그것의 [:Parent:부모] 와 관련이 있다.

{{{#!dot
digraph G {
 compound=true;
 rankdir = LR
 background="#999999";
 subgraph cluster_1 {
  style=filled;
  color="#eeeeee";
  node [shape=box,style=filled,color=lightgray];
  "rev 0" -> "rev 1" -> "rev 2" -> "rev 3";
  "rev 2" -> "rev 4";
  label = "store";
 }
 subgraph cluster_0 {
  style=filled;
  color=lightgrey;
  node [style=filled,color=white];
  edge [style=invis];
  "main.c"-> "main.h" -> ".hgignore" -> ".hgtags"
  label="working directory";
 }
 "rev 2" -> ".hgtags" [style = dotted lhead = cluster_0 constraint=false]
 "rev 4" -> ".hgtags" [lhead = cluster_0 constraint=false]
 ".hgtags" -> "rev 4" [color = red label = "commit" ltail = cluster_0 constraint=false]
}
}}}

revision 4는 working directory에 있는 revision이었던 revision 2의 '''branch'''임을 주의하라. 이제 revision 4는 working directory의 '''parent'''이다.

== Revisions, Changesets, Heads, and Tip ==

머큐리얼 그룹은 전체 프로젝트의 revision들인 단일 atomic [:ChangeSet:changesets]에 여러개의 파일에 대한 변경사항들에 관여한다. 이 각각의 것들은 순차적인 [:RevisionNumber:revision number]를 받는다. 왜냐하면 머큐리얼은 분산된 병행 개발을 허락하며 이러한 revision numbers는 사용자들 마다 다를 것이기 때문이다. 따라서 머큐리얼은 또한 각각에 대하여 global [:ChangeSetID:changeset ID] 를 할당할 것이다. Changeset ID는 40자의 16진법 숫자이지만 "e38487"와 같이 명확한 prefix로 요약되어질 수 있다.

{{{#!dot
digraph {
   rankdir = LR
   node [shape=box]
   "rev 0:838e" -> "rev 1:34ef" -> "rev 2:4563"
   "rev 1:34ef" -> "rev 3:fe56"
   "rev 2:4563" -> "rev 4:ac98"
   "rev 3:fe56" -> "rev 4:ac98"
   "rev 4:ac98" -> "rev 5:0345"
   "rev 4:ac98" -> "rev 6:19e3 (tip)"
   label="example history"
}
}}}

revision history에서의 Branches 와[:Merge:merges]는 어떤 시점에서도 발생할 수 있다. 각각의 merge되지 않은 branch는 revision 이력의 새로운 [:Head:head]를 만든다. 여기 revision 5와 6는 head들이다. 머큐리얼은 가장 높은 revision number를 가진 revision 6가 repository의 tip으로 여긴다.

== Cloning, Making Changes, Merging, and Pulling ==

다음과 같은 store를 가진 사용자 Alice와 함께 시작해보자.

{{{#!dot
digraph {
   label="Alice's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d
}
}}}

Bob 은 이 repo와 Alice의 store의 완전한 복사본을 [:Clone:clones] 한다.

{{{#!dot
digraph {
   label="Bob's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d
}
}}}

그리고 Bob은 두개의 changes를 [:Commit:commits]한다:

{{{#!dot
digraph {
   label="Bob's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d->e->f
   e [color=blue]
   f [color=blue]
}
}}}

그리고 Alice는 그녀대로 병행적으로 change를 만든다:

{{{#!dot
digraph {
   label="Alice's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d->g
   g [color=red]
}
}}}

그리고 Bob은 동기화(synchronize)를 위해 Alice의 repo를 [:Pull:pulls]한다. 이는 Alice의 모든 change를 Bob의 repo에 복사한다:

{{{#!dot
digraph {
   label="Bob's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d->e->f
   e [color=blue]
   f [color=blue]
   d->g
   g [color=red;label="g (tip)"]
}
}}}

Alice의 '''g'''는 Bob의 repository에 잇는 최신 head이기때문에 지금은 '''tip'''으로 되어 있다. Bob은 ('''f''')에서 작업한 최근 change를 tip과 결합시키는 [:Merge:merge]하고, 그 결과를 commit하고 끝낸다:

{{{#!dot
digraph {
   label="Bob's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d->e->f
   e [color=blue]
   f [color=blue]
   d->g
   g [color=red]
   f->h
   g->h
   h [color=green;label="h (tip)"]
}
}}}

지금 만약 Alice가 Bob으로부터 '''pulls'''한다면, 그녀는 Bob의 change인 e,f,h를 받고서 완전히 동기화 될 것이다.:

{{{#!dot
digraph {
   label="Alice's Repo"
   rankdir = LR
   node [shape=box]
   a->b->c->d->g
   d->e->f
   e [color=blue]
   f [color=blue]
   g [color=red]
   f->h
   g->h
   h [color=green;label="h (tip)"]
}
}}}

== 분산형 시스템 ==

머큐리얼은 완전한 분산형 시스템으로, 중앙저장소의 internal notion을 가지지 않는다. 따라서 사용자는 change들을 공유하기 위한 토폴리리 정의로부터 자유로워진다.(CommunicatingChanges를 참고하라):

{{{#!dot
digraph {
   Alice -> Central
   Central -> Alice
   Bob -> Central
   Alice -> Bob
   Alice -> Carl
   Carl -> Central
   Bob -> Carl
   Carl -> Bob
   "Carl's Laptop" -> Carl
   Carl -> "Carl's Laptop"
   "Carl's Laptop" -> Central
   Central [style=fill;color=blue;label="Main Public Repo"]
   label="A Mercurial Network"
}
}}}

실제 머큐리얼에 대한 지시서는 ["Tutorial"]를 참고하라.

머큐리얼에 대한 이해

머큐리얼은 초보자에게 어려울 수 있는 분산형 개발 모델이다. 이 페이지는 기초적인 개념을 설명한다. 한단계씩 따라해 보려면 ["KoreanTutorial"]를 참고하라.

(Translations: [:BrazilianPortugueseUnderstandingMercurial:Brazilian Portuguese], [:ChineseUnderstandingMercurial:Chinese], [:FrenchUnderstandingMercurial:French], [:GermanUnderstandingMercurial:German], [:ItalianUnderstandingMercurial:Italian], [:JapaneseUnderstandingMercurial:Japanese], [:KoreanUnderstandingMercurial:Korean], [:SpanishUnderstandingMercurial:Spanish] )

TableOfContents

Repository에 있는 것들

머큐리얼의 [:Repository:repositories]에는 store과 함께 [:WorkingDirectory:working directory]가 있다:

store에는 프로젝트에 대한 완전한 이력이 남아 있다. 이러한 이력을 중앙 한곳에만 가지고 있는 전통적인 [:SCM:SCMs]과는 달리 모든 working directory는 이력에 대한 복사본을 쌍으로 가지고 있다. 이것은 병행적으로 개발하는 것을 가능케 한다.

working directory는 편집을 위한 준비로 특정 시점에(예를 들어 rev 2) 프로젝트의 파일의 복사본을 포함하고 있다. 왜냐하면 같이 포함되어 있는 [:Tag:tags]와 ignore files는 revision-controlled이기 때문이다.

변경사항 Commit 하기

[:Commit:commit]을 할때, working directory의 상태는 새로운 [:Revision:revision]으로 기록 되어진 그것의 [:Parent:부모] 와 관련이 있다.

revision 4는 working directory에 있는 revision이었던 revision 2의 branch임을 주의하라. 이제 revision 4는 working directory의 parent이다.

Revisions, Changesets, Heads, and Tip

머큐리얼 그룹은 전체 프로젝트의 revision들인 단일 atomic [:ChangeSet:changesets]에 여러개의 파일에 대한 변경사항들에 관여한다. 이 각각의 것들은 순차적인 [:RevisionNumber:revision number]를 받는다. 왜냐하면 머큐리얼은 분산된 병행 개발을 허락하며 이러한 revision numbers는 사용자들 마다 다를 것이기 때문이다. 따라서 머큐리얼은 또한 각각에 대하여 global [:ChangeSetID:changeset ID] 를 할당할 것이다. Changeset ID는 40자의 16진법 숫자이지만 "e38487"와 같이 명확한 prefix로 요약되어질 수 있다.

revision history에서의 Branches 와[:Merge:merges]는 어떤 시점에서도 발생할 수 있다. 각각의 merge되지 않은 branch는 revision 이력의 새로운 [:Head:head]를 만든다. 여기 revision 5와 6는 head들이다. 머큐리얼은 가장 높은 revision number를 가진 revision 6가 repository의 tip으로 여긴다.

Cloning, Making Changes, Merging, and Pulling

다음과 같은 store를 가진 사용자 Alice와 함께 시작해보자.

Bob 은 이 repo와 Alice의 store의 완전한 복사본을 [:Clone:clones] 한다.

그리고 Bob은 두개의 changes를 [:Commit:commits]한다:

그리고 Alice는 그녀대로 병행적으로 change를 만든다:

그리고 Bob은 동기화(synchronize)를 위해 Alice의 repo를 [:Pull:pulls]한다. 이는 Alice의 모든 change를 Bob의 repo에 복사한다:

Alice의 g는 Bob의 repository에 잇는 최신 head이기때문에 지금은 tip으로 되어 있다. Bob은 (f)에서 작업한 최근 change를 tip과 결합시키는 [:Merge:merge]하고, 그 결과를 commit하고 끝낸다:

지금 만약 Alice가 Bob으로부터 pulls한다면, 그녀는 Bob의 change인 e,f,h를 받고서 완전히 동기화 될 것이다.:

분산형 시스템

머큐리얼은 완전한 분산형 시스템으로, 중앙저장소의 internal notion을 가지지 않는다. 따라서 사용자는 change들을 공유하기 위한 토폴리리 정의로부터 자유로워진다.(CommunicatingChanges를 참고하라):

실제 머큐리얼에 대한 지시서는 ["Tutorial"]를 참고하라.

KoreanUnderstandingMercurial (last edited 2012-11-11 13:32:26 by abuehl)