Differences between revisions 1 and 2
Revision 1 as of 2007-07-15 12:17:32
Size: 74
Editor: PeterOtten
Comment: Stub
Revision 2 as of 2007-07-15 13:37:19
Size: 6455
Editor: PeterOtten
Comment: raw version, partially translated
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Sorry, noch nicht übersetzt. == Tutorial - Die Vorgeschichte ("History") eines Repositorys erkunden ==
Line 3: Line 3:
Weiter auf englisch mit TutorialHistory Wir sind den Anweisungen in GermanTutorialClone gefolgt und haben ein ["Repository"] geklont; unsere lokale Kopie heißt {{{my-hello}}}.

Werfen wir einen Blick auf die History dieses Repository. Dazu verwenden wir den {{{log}}}-Befehl. Der zeigt eine Zusammenfassung aller Ereignisse an, die in dem ["Repository"] stattgefunden haben, zuerst das jüngste und dann rückwärts durch die Geschichte zu immer älteren Ereignissen.

{{{
$ cd my-hello
$ hg log
changeset: 1:82e55d328c8c
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
summary: Create a makefile

changeset: 0:0a04b987be5a
user: mpm@selenic.com
date: Fri Aug 26 01:20:50 2005 -0700
summary: Create a standard "hello, world" program
}}}

Die ausgegebenen Zeilen erfordern eine Erklärung.

 * Jeder Absatz beschreibt einen einzelnen ChangeSet. Ein ChangeSet ist die a Änderung einer oder mehrer Dateien, zusammengefasst zu einer logischen Einheit.
   * In unserem Fall besteht die History des ["Repository"]s aus zwei ["ChangeSet"]s.
 * {{{changeset}}} ist die eindeutige Bezeichnung eines ChangeSet.
   * Die Zahl vor dem Doppelpunkt ist eine RevisionNumber, eine lokale Abkürzung für den ChangeSet. Sie gilt nur innerhalb dieses ["Repository"]s.
   * Die lange Hexadezimalzahl hinter dem Doppelpunkt ist die a ChangeSetID; sie stellt eine eindeutige Bezeichnung des [ChangeSet]s dar und ist gleich in allen Repositories, die diesen ChangeSet enthalten. Wenn sie mit jemandem über einen ChangeSet diskutieren wollen, benutzen sie di ChangeSetID, nicht die RevisionNumber.
 * {{{tag}}} ist ein ["Tag"], ein frei gewählter Name für einen ChangeSet.
   * Sie können jedem beliebigen ChangeSet eien oder mehrere ["Tag"]s zuweisen. In der Praxis besitzen nicht viele ["ChangeSet"]s ["Tag"]s, somit ist die {{{tag}}}-Zeile selten vorhanden.
   * Ein besonderes ["Tag"] namens {{{tip}}} markiert immer den ["Tip"] (für "Spitze"), also den jüngsten ChangeSet im ["Repository"]. Wenn wir einen weiteren ChangeSet erzeugen (was wir bald tun werden), wird dieser der neue ["Tip"].
 * {{{user}}} (Benutzer) bezeichnet die Person, die den ChangeSet erzeugt hat. Das ist eine frei formatierbare Zeichenkette, die gewönlich eine Emailadresse enthält, manchmal auch einen Namen.
 * {{{date}}} (Datum) zeigt an. wann der ChangeSet erzeugt wurde. Diese Daten werden in der Zeitzone des Erzeugers des [ChangeSet]s angezeigt.
 * {{{summary}}} (Zusammenfassung) zeigt die erste Zeile der Beschreibung des [ChangeSet]s. Sie wurde vom Erzeuger des [ChangeSet]s eingegeben als er diesen erzeugt hat. Er soll helfen, den Zweick des [ChangeSet]s zu verstehen. XXX
 * {{{parent}}} identifies the parent ["ChangeSet"]s, in case there are more than one, which happens when you merge changes from several repositories.
   * Most of the times there is only one parent, which is the one changeset older than itself. This is the case in our example above.

We can get more detailed history information by asking for verbose output with the {{{-v}}} option, or the {{{--debug}}} global option for everything under the sun:

{{{
$ hg log -v
changeset: 1:82e55d328c8ca4ee16520036c0aaace03a5beb65
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
files: Makefile
description:
Create a makefile

(...)

$ hg log --debug
manifest: 1:0c7c1d435e6703e03ac6634a7c32da3a082d1600
changeset: 1:82e55d328c8ca4ee16520036c0aaace03a5beb65
tag: tip
parent: 0:0a04b987be5ae354b710cefeba0e2d9de7ad41a9
parent: -1:0000000000000000000000000000000000000000
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
files+: Makefile
description:
Create a makefile

(...)
}}}

Verbose output contains a few more fields than the default output.

 * {{{changeset}}} now gives the unabbreviated ChangeSetID.
 * {{{files}}} lists the files modified in this ChangeSet.
 * {{{description}}} contains the complete multi-line description of the ChangeSet, rather than just the first line.
   * In our case, the descriptions are only one-line long, so there's not much difference.


The --debug output adds the following fields to the verbose output:

 * {{{file+}}} lists the file added in this changeset.
 * {{{file-}}} lists the file removed in this changeset.
 * {{{manifest}}} gives the ["Manifest"] ID for this changeset.
 * two {{{parent}}} fields giving the changeset ID of both parents for this changeset, where {{{-1:0000000000000000000000000000000000000000}}} refers to a non-existant parent.


The {{{log}}} command comes with a {{{-r}}} option to view specific changesets.

{{{
$ hg log -r1
changeset: 1:82e55d328c8c
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
summary: Create a makefile
}}}

<!> The {{{-r}}} option actually supports a very flexible syntax to select range of changesets. However, due to limited number of changesets available in our sample repository, we are unable to provide a good demonstration. Please consult Mercurial's [http://www.selenic.com/mercurial/hg.1.html manpage] for more information.

The {{{log}}} command also comes with a {{{-p}}} option to show the patches associated with the changesets:

{{{
$ hg log -r1 -p
changeset: 1:82e55d328c8c
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
summary: Create a makefile

diff -r 0a04b987be5a -r 82e55d328c8c Makefile
--- /dev/null Fri Aug 26 01:20:50 2005 -0700
+++ b/Makefile Fri Aug 26 01:21:28 2005 -0700
@@ -0,0 +1,1 @@
+all: hello

}}}

We can also use the {{{tip}}} command to show info of the ''tip'', i.e. the latest, changeset. The {{{tip}}} command may be considered a shortcut to {{{log -r tip}}}.

{{{
$ hg tip
changeset: 1:82e55d328c8c
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
summary: Create a makefile

$ hg log -r tip
changeset: 1:82e55d328c8c
tag: tip
user: mpm@selenic.com
date: Fri Aug 26 01:21:28 2005 -0700
summary: Create a makefile

}}}

Now that we have some slight idea of what has happened, let's jump in and make some changes! Onwards, to TutorialFirstChange!

Tutorial - Die Vorgeschichte ("History") eines Repositorys erkunden

Wir sind den Anweisungen in GermanTutorialClone gefolgt und haben ein ["Repository"] geklont; unsere lokale Kopie heißt my-hello.

Werfen wir einen Blick auf die History dieses Repository. Dazu verwenden wir den log-Befehl. Der zeigt eine Zusammenfassung aller Ereignisse an, die in dem ["Repository"] stattgefunden haben, zuerst das jüngste und dann rückwärts durch die Geschichte zu immer älteren Ereignissen.

$ cd my-hello
$ hg log
changeset:   1:82e55d328c8c
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
summary:     Create a makefile

changeset:   0:0a04b987be5a
user:        mpm@selenic.com
date:        Fri Aug 26 01:20:50 2005 -0700
summary:     Create a standard "hello, world" program

Die ausgegebenen Zeilen erfordern eine Erklärung.

  • Jeder Absatz beschreibt einen einzelnen ChangeSet. Ein ChangeSet ist die a Änderung einer oder mehrer Dateien, zusammengefasst zu einer logischen Einheit.

    • In unserem Fall besteht die History des ["Repository"]s aus zwei ["ChangeSet"]s.

  • changeset ist die eindeutige Bezeichnung eines ChangeSet.

    • Die Zahl vor dem Doppelpunkt ist eine RevisionNumber, eine lokale Abkürzung für den ChangeSet. Sie gilt nur innerhalb dieses ["Repository"]s.

    • Die lange Hexadezimalzahl hinter dem Doppelpunkt ist die a ChangeSetID; sie stellt eine eindeutige Bezeichnung des [ChangeSet]s dar und ist gleich in allen Repositories, die diesen ChangeSet enthalten. Wenn sie mit jemandem über einen ChangeSet diskutieren wollen, benutzen sie di ChangeSetID, nicht die RevisionNumber.

  • tag ist ein ["Tag"], ein frei gewählter Name für einen ChangeSet.

    • Sie können jedem beliebigen ChangeSet eien oder mehrere ["Tag"]s zuweisen. In der Praxis besitzen nicht viele ["ChangeSet"]s ["Tag"]s, somit ist die tag-Zeile selten vorhanden.

    • Ein besonderes ["Tag"] namens tip markiert immer den ["Tip"] (für "Spitze"), also den jüngsten ChangeSet im ["Repository"]. Wenn wir einen weiteren ChangeSet erzeugen (was wir bald tun werden), wird dieser der neue ["Tip"].

  • user (Benutzer) bezeichnet die Person, die den ChangeSet erzeugt hat. Das ist eine frei formatierbare Zeichenkette, die gewönlich eine Emailadresse enthält, manchmal auch einen Namen.

  • date (Datum) zeigt an. wann der ChangeSet erzeugt wurde. Diese Daten werden in der Zeitzone des Erzeugers des [ChangeSet]s angezeigt.

  • summary (Zusammenfassung) zeigt die erste Zeile der Beschreibung des [ChangeSet]s. Sie wurde vom Erzeuger des [ChangeSet]s eingegeben als er diesen erzeugt hat. Er soll helfen, den Zweick des [ChangeSet]s zu verstehen. XXX

  • parent identifies the parent ["ChangeSet"]s, in case there are more than one, which happens when you merge changes from several repositories.

    • Most of the times there is only one parent, which is the one changeset older than itself. This is the case in our example above.

We can get more detailed history information by asking for verbose output with the -v option, or the --debug global option for everything under the sun:

$ hg log -v
changeset:   1:82e55d328c8ca4ee16520036c0aaace03a5beb65
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
files:       Makefile
description:
Create a makefile

(...)

$ hg log --debug
manifest:    1:0c7c1d435e6703e03ac6634a7c32da3a082d1600
changeset:   1:82e55d328c8ca4ee16520036c0aaace03a5beb65
tag:         tip
parent:      0:0a04b987be5ae354b710cefeba0e2d9de7ad41a9
parent:      -1:0000000000000000000000000000000000000000
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
files+:      Makefile
description:
Create a makefile

(...)

Verbose output contains a few more fields than the default output.

  • changeset now gives the unabbreviated ChangeSetID.

  • files lists the files modified in this ChangeSet.

  • description contains the complete multi-line description of the ChangeSet, rather than just the first line.

    • In our case, the descriptions are only one-line long, so there's not much difference.

The --debug output adds the following fields to the verbose output:

  • file+ lists the file added in this changeset.

  • file- lists the file removed in this changeset.

  • manifest gives the ["Manifest"] ID for this changeset.

  • two parent fields giving the changeset ID of both parents for this changeset, where -1:0000000000000000000000000000000000000000 refers to a non-existant parent.

The log command comes with a -r option to view specific changesets.

$ hg log -r1
changeset:   1:82e55d328c8c
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
summary:     Create a makefile

<!> The -r option actually supports a very flexible syntax to select range of changesets. However, due to limited number of changesets available in our sample repository, we are unable to provide a good demonstration. Please consult Mercurial's [http://www.selenic.com/mercurial/hg.1.html manpage] for more information.

The log command also comes with a -p option to show the patches associated with the changesets:

$ hg log -r1 -p
changeset:   1:82e55d328c8c
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
summary:     Create a makefile

diff -r 0a04b987be5a -r 82e55d328c8c Makefile
--- /dev/null   Fri Aug 26 01:20:50 2005 -0700
+++ b/Makefile  Fri Aug 26 01:21:28 2005 -0700
@@ -0,0 +1,1 @@
+all: hello

We can also use the tip command to show info of the tip, i.e. the latest, changeset. The tip command may be considered a shortcut to log -r tip.

$ hg tip
changeset:   1:82e55d328c8c
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
summary:     Create a makefile

$ hg log -r tip
changeset:   1:82e55d328c8c
tag:         tip
user:        mpm@selenic.com
date:        Fri Aug 26 01:21:28 2005 -0700
summary:     Create a makefile

Now that we have some slight idea of what has happened, let's jump in and make some changes! Onwards, to TutorialFirstChange!

GermanTutorialHistory (last edited 2009-05-19 19:31:00 by localhost)