Size: 6491
Comment: partial raw translation
|
Size: 452
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Mercurials Model dezentraler Entwicklung kann neue Benutzer verwirren. Diese Seite beleuchtet einige grundlegende Konzepte. Im [wiki:"GermanTutorial" Tutorial] finden sie eine Schritt-für-Schritt-Anleitung. [[TableOfContents]] == Was is in einem Repository == Mercurial-Repositories enthalten ein Arbeitsverzeichnis gekoppelt mit einem Speicher: {{{#!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 = "Speicher"; } subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; edge [style=invis]; "main.c"-> "main.h" -> ".hgignore" -> ".hgtags" label="Arbeitsverzeichnis"; } "rev 2" -> ".hgtags" [lhead = cluster_0 constraint=false] } }}} Der Speicher enthält die '''vollständige''' History (alle jemals durchgeführten Änderungen) des Projekts. Anders als traditionelle SCMs, wo es nur eine zentrale Kopie dieser History gibt, besitzt jedes Arbeitsverzeichnis eine eigenen privaten Kopie der History. Dies erlaubt es, parallel zu entwickeln. Das Arbeitsverzeichnis enthält eine Kopie der Dateien eines Projekts zu einem gegebenen Zeitpunkt (beispielsweise rev 2), bereit zum Bearbeiten. Because tags and ignored files are revision-controlled, they are also included. == Committing Changes == Wenn sie '''commit'''ten, wird der Zustand des Arbeitsverzeichnisses mit den Änderungen im Vergleich zu seinen Eltern als eine neue Revision aufgezeichnet: {{{#!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 = "Speicher"; } subgraph cluster_0 { style=filled; color=lightgrey; node [style=filled,color=white]; edge [style=invis]; "main.c"-> "main.h" -> ".hgignore" -> ".hgtags" label="Arbeitsverzeichnis"; } "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] } }}} Beachten sie, dass Revision 4 ein '''branch''' (Zweig) der Revision 2 ist, die zuvor die Revision im Arbeitsverzeichnis war. Jetzt ist Revision 4 der '''parent''' des Arbeitsverzeichnisses. == Revisionen, Changesets, Heads, und Tip == Mercurial fasst zusammengehörige Änderungen an verschiedenen Dateien jeiweils zu einem einzigen atomaren '''Changeset''' zusammen. Solche changesets sind die '''Revisionen''' des gesamten Projekts, die jeweils eine aufeinanderfolgender Nummer erhalten. Da Mercurial gleichzeitiges verteiltes Entwickeln erlaubt, können diese Nummben sich zwischen den einzelnen Benutzern unterscheiden. Darum weist Mercurial außerdem jeder Revision eine globale '''Changeset-ID''' zu. Changeset-IDs sind 40-stellige Hexadezimalzahlen, können jedoch auf die Anfangsstellen (z. B. "e38487") abgekürzt werden, solange dadurch keine Zweideutigkeit entsteht. {{{#!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="Beispiel-History" } }}} Zweige (branches) und Merges (Zusammenführungen) in der Revision-History können an jedem Punkt auftreten. Each unmerged branch creates a new '''head''' of the revision history. XXX Here, revisions 5 and 6 are heads. Mercurial considers revision 6 to be the '''tip''' of the repository, the head with the highest revision number. == Cloning, Making Changes, Merging, and Pulling == Let's start with a user Alice, who has a store that looks like: {{{#!dot digraph { label="Alices Repo" rankdir = LR node [shape=box] a->b->c->d } }}} Bob '''clones''' this repo, and ends up with a complete copy of Alice's store (though his working directory is independent!): {{{#!dot digraph { label="Bob's Repo" rankdir = LR node [shape=box] a->b->c->d } }}} Bob then '''commits''' a couple changes: {{{#!dot digraph { label="Bob's Repo" rankdir = LR node [shape=box] a->b->c->d->e->f e [color=blue] f [color=blue] } }}} Alice then makes her own change in parallel: {{{#!dot digraph { label="Alice's Repo" rankdir = LR node [shape=box] a->b->c->d->g g [color=red] } }}} Bob then '''pulls''' Alice's repo to synchronize. This copies all of Alice's changes into Bob's 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)"] } }}} Because Alice's '''g''' is the newest head in Bob's repository, it's now the '''tip'''. Bob then does a '''merge''' which combines the last change he was working on ('''f''') with the tip, commits the result, and ends up with: {{{#!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)"] } }}} Now if Alice '''pulls''' from Bob, she will get Bob's changes e, f, and h, and they will be fully synchronized: {{{#!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)"] } }}} == A Decentralized System == Mercurial is a completely decentralized system, and thus has no internal notion of a central repository. Thus users are free to define their own topologies for sharing changes: {{{#!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" } }}} For a hands-on introduction to using Mercurial, see the ["GermanTutorial"]. |
Friends phone him constantly Ali. Distributing production is what she does but she's already signed another one particular particular. What her as well as friends her love is acting but she doesn't have got the time lately. Some time ago I thought i would live in West The state of virginia. She's terrible at design but may think that want to check her website: http://greatsampleoffers.com/free-samples/personal-care/free-incontinence-samples-tena/ |
Friends phone him constantly Ali. Distributing production is what she does but she's already signed another one particular particular. What her as well as friends her love is acting but she doesn't have got the time lately. Some time ago I thought i would live in West The state of virginia. She's terrible at design but may think that want to check her website: http://greatsampleoffers.com/free-samples/personal-care/free-incontinence-samples-tena/