hgbook

changeset 938:651aa8fd9882

Work in progress in tour-basic
author Romain PELISSE <belaran@gmail.com>
date Mon Feb 16 10:42:23 2009 +0100 (2009-02-16)
parents d7159547e28a
children 99b93caf2db2
files fr/tour-basic.tex
line diff
     1.1 --- a/fr/tour-basic.tex	Sat Feb 14 13:27:23 2009 +0100
     1.2 +++ b/fr/tour-basic.tex	Mon Feb 16 10:42:23 2009 +0100
     1.3 @@ -116,105 +116,110 @@
     1.4  
     1.5  Avec Mercurial, tout se déroule au sein du \emph{dépot}\footnote{NdT: Dépôt est
     1.6  la traduction que j'ai retenu pour tout l'ouvrage du terme anglais \textit{repository}}.
     1.7 -Le dépôt d'une projet contient tout les fichiers qui ``appartiennent'' au projet.
     1.8 -In Mercurial, everything happens inside a \emph{repository}.  The
     1.9 -repository for a project contains all of the files that ``belong to''
    1.10 -that project, along with a historical record of the project's files.
    1.11 -
    1.12 -There's nothing particularly magical about a repository; it is simply
    1.13 -a directory tree in your filesystem that Mercurial treats as special.
    1.14 -You can rename or delete a repository any time you like, using either the
    1.15 -command line or your file browser.
    1.16 -
    1.17 -\subsection{Making a local copy of a repository}
    1.18 -
    1.19 -\emph{Copying} a repository is just a little bit special.  While you
    1.20 -could use a normal file copying command to make a copy of a
    1.21 -repository, it's best to use a built-in command that Mercurial
    1.22 -provides.  This command is called \hgcmd{clone}, because it creates an
    1.23 -identical copy of an existing repository.
    1.24 +Le dépôt d'une projet contient tout les fichiers qui ``appartiennent'' 
    1.25 +au projet, avec l'historique des fichiers du projet.
    1.26 +
    1.27 +Il n'y a rien de particulièrement magique au sujet de ce dépot, c'est
    1.28 +simplement une arboresence sur votre système de fichiers que Mercurial
    1.29 +traite de manière spéciale. Si vous pouvez renommer ou effacer ce répertoire
    1.30 +à n'importe quel moment, en utilisant la ligne de commande ou votre
    1.31 +explorateur de fichiers.
    1.32 +
    1.33 +\subsection{Faire une copie locale de votre dépot}
    1.34 +
    1.35 +\emph{Copier} un dépôt est just un peu spécial. Bien que vous 
    1.36 +puissiez utiliser une commande habituelle de copie pour copier
    1.37 +votre dépôt, il vaut mieux utiliser une commande fournie par
    1.38 +Mercurial. Cette commande est appelée \hgcmd{clone}, car elle
    1.39 +crée une copie identique d'un dépôt existant.
    1.40  \interaction{tour.clone}
    1.41 -If our clone succeeded, we should now have a local directory called
    1.42 -\dirname{hello}.  This directory will contain some files.
    1.43 +Si votre opération de clonage réussit, vous devriez maintenant
    1.44 +avoir un répertoire local appelé \dirname{hello}. Ce répertoire
    1.45 +contiendra quelques fichiers.
    1.46  \interaction{tour.ls}
    1.47 -These files have the same contents and history in our repository as
    1.48 -they do in the repository we cloned.
    1.49 -
    1.50 -Every Mercurial repository is complete, self-contained, and
    1.51 -independent.  It contains its own private copy of a project's files
    1.52 -and history.  A cloned repository remembers the location of the
    1.53 -repository it was cloned from, but it does not communicate with that
    1.54 -repository, or any other, unless you tell it to.
    1.55 -
    1.56 -What this means for now is that we're free to experiment with our
    1.57 -repository, safe in the knowledge that it's a private ``sandbox'' that
    1.58 -won't affect anyone else.
    1.59 -
    1.60 -\subsection{What's in a repository?}
    1.61 -
    1.62 -When we take a more detailed look inside a repository, we can see that
    1.63 -it contains a directory named \dirname{.hg}.  This is where Mercurial
    1.64 -keeps all of its metadata for the repository.
    1.65 +Ces fichiers ont le même contenu et historique dans votre dépôt
    1.66 +qu'ils ont dans le dépôt que vous avez cloné.
    1.67 +
    1.68 +Chaque dépôt Mercurial est complet, autonome et indépendant. Il
    1.69 +contient sa propre copie privé des fichiers du projet et de leurs
    1.70 +historiques. Le clone d'un dépôt se souvient de la localisation du
    1.71 +dépôt à partir duquel il a été clôné, mais il ne communique pas avec
    1.72 +ce dernier, ou un autre, à moins que vous ne lui demandiez.
    1.73 +
    1.74 +Ce que tout ceci signifie pour le moment est que nous sommes libre
    1.75 +d'expérimenter avec ce dépôt, confiant dans le fait qu'il s'agit d'un
    1.76 +``bac à sable'' qui n'affectera personne d'autres.
    1.77 +
    1.78 +\subsection{Quel est le contenu d'un dépôt ?}
    1.79 +
    1.80 +Prêtons plus attention un instant au contenu d'un dépôt. Nous voyons 
    1.81 +qu'il contient un répertoire nommée \dirname{.hg}. C'est ici que Mercurial
    1.82 +conserve toutes ses métadonnées.
    1.83  \interaction{tour.ls-a}
    1.84  
    1.85 -The contents of the \dirname{.hg} directory and its subdirectories are
    1.86 -private to Mercurial.  Every other file and directory in the
    1.87 -repository is yours to do with as you please.
    1.88 -
    1.89 -To introduce a little terminology, the \dirname{.hg} directory is the
    1.90 -``real'' repository, and all of the files and directories that coexist
    1.91 -with it are said to live in the \emph{working directory}.  An easy way
    1.92 -to remember the distinction is that the \emph{repository} contains the
    1.93 -\emph{history} of your project, while the \emph{working directory}
    1.94 -contains a \emph{snapshot} of your project at a particular point in
    1.95 -history.
    1.96 -
    1.97 -\section{A tour through history}
    1.98 -
    1.99 -One of the first things we might want to do with a new, unfamiliar
   1.100 -repository is understand its history.  The \hgcmd{log} command gives
   1.101 -us a view of history.
   1.102 +Le contenu du répertoire \dirname{.hg} et ses sous répertoires sont les
   1.103 +seules propre à Mercurial. Tout les autres fichiers et répertoire dans 
   1.104 +le répertoire sont à vous, et vous pouvez faire ce que vous en voulez.
   1.105 +
   1.106 +Pour introduire un peu de terminologie, le répertoire \dirname{.hg} est
   1.107 +un ``vrai'' dépôt, et tout les fichiers et les répertoires qui coexistent
   1.108 +avec lui, sont désigné sous le nom de \emph{espace de travail}\footnote{NdT: 
   1.109 +\textit{working directory}}. Une manière facile de se rappeler cette 
   1.110 +distinction est de retenir que le \emph{dépôt} contient l'\emph{historique}
   1.111 +de votre projet, alors que l'\emph{espace de travail} contient une \emph{copie
   1.112 +précise}\footnote{NdT: Ce terme est une traduction du terme anglais 
   1.113 +\textit{snapshot}. Il est traduit ici pour faciliter la lecture, mais ne sera
   1.114 +plus traduit par la suite.} de votre projet à un certain point de son
   1.115 +historique.
   1.116 +
   1.117 +\section{Une ballade dans l'historique}
   1.118 +
   1.119 +Une des premières choses que vous aurez envie de faire avec un nouveau
   1.120 +dépôt, sera de comprendre son historique. La commande \hgcmd{log} vous
   1.121 +donne une vue de l'historique.
   1.122  \interaction{tour.log}
   1.123 -By default, this command prints a brief paragraph of output for each
   1.124 -change to the project that was recorded.  In Mercurial terminology, we
   1.125 -call each of these recorded events a \emph{changeset}, because it can
   1.126 -contain a record of changes to several files.
   1.127 -
   1.128 -The fields in a record of output from \hgcmd{log} are as follows.
   1.129 +Par défaut, cette commande affiche à l'écran un bref paragraphe pour chaque
   1.130 +révision enregistrée pour ce projet. Dans la terminologie de Mercurial, nous
   1.131 +appelons chacun de ces évènements enregistrés un \emph{changeset}, parce 
   1.132 +qu'il contient un ensemble de mofications sur plusieurs fichiers.
   1.133 +
   1.134 +La commande \hgcmd{log} affiche ainsi ces informations:
   1.135  \begin{itemize}
   1.136 -\item[\texttt{changeset}] This field has the format of a number,
   1.137 -  followed by a colon, followed by a hexadecimal string.  These are
   1.138 -  \emph{identifiers} for the changeset.  There are two identifiers
   1.139 -  because the number is shorter and easier to type than the hex
   1.140 -  string.
   1.141 -\item[\texttt{user}] The identity of the person who created the
   1.142 -  changeset.  This is a free-form field, but it most often contains a
   1.143 -  person's name and email address.
   1.144 -\item[\texttt{date}] The date and time on which the changeset was
   1.145 -  created, and the timezone in which it was created.  (The date and
   1.146 -  time are local to that timezone; they display what time and date it
   1.147 -  was for the person who created the changeset.)
   1.148 -\item[\texttt{summary}] The first line of the text message that the
   1.149 -  creator of the changeset entered to describe the changeset.
   1.150 +\item[\texttt{changeset}] Ce champ contient un nombre, séparé par une 
   1.151 +  virgule, d'une chaine hexadécimal. Il s'agit en effet d'\emph{identifiants}
   1.152 +  pour un \textit{changeset}. Il y a deux identifiants car le numéro de
   1.153 +  la révision est plus court et plus à facile à saisir qu'une séquence
   1.154 +  hexadécimale.
   1.155 +\item[\texttt{utilisateur}] L'identité de la personne qui a crée ce 
   1.156 +  \textit{changeset}. C'est un champ libre de forme, mais la plupart du
   1.157 +  temps il contient le nom et l'email de la personne.
   1.158 +\item[\texttt{date}] La date et l'heure à laquelle le \textit{changeset}
   1.159 +  a été crée, ainsi que le \textit{timezone} dans laquelle il a été crée. %%%TODO: Translate 'timezone' properly
   1.160 +  (La date et l'heure sont locals à cette \textit{timezone}, ils indiquent
   1.161 +  donc quelle date et quelle il était pour la personne qui a crée ce 
   1.162 +  \textit{changeset}.)
   1.163 +\item[\texttt{résumé}] La première du message que le créateur a associée à
   1.164 +  son \textit{changeset} pour le décrire.
   1.165  \end{itemize}
   1.166 -The default output printed by \hgcmd{log} is purely a summary; it is
   1.167 -missing a lot of detail.
   1.168 -
   1.169 -Figure~\ref{fig:tour-basic:history} provides a graphical representation of
   1.170 -the history of the \dirname{hello} repository, to make it a little
   1.171 -easier to see which direction history is ``flowing'' in.  We'll be
   1.172 -returning to this figure several times in this chapter and the chapter
   1.173 -that follows.
   1.174 +
   1.175 +Par défaut, la commande \hgcmd{log} n'affiche qu'un résumé, il manque 
   1.176 +beaucoup de détails.
   1.177 +
   1.178 +
   1.179 +La figure~\ref{fig:tour-basic:history} fournit un représentation graphique
   1.180 +de l'historique du dépôt \dirname{hello}, pour rendre plus facile de voir
   1.181 +dans quelle direction l'historique se ``déroule''\footnote{NdT: \textit{flowing in}.}.
   1.182 +Nous reviendrons régulièrement à cette représentation dans ce chapitre et
   1.183 +ceux qui suivent.
   1.184  
   1.185  \begin{figure}[ht]
   1.186    \centering
   1.187    \grafix{tour-history}
   1.188 -  \caption{Graphical history of the \dirname{hello} repository}
   1.189 +  \caption{Représentation graphique du dépôt \dirname{hello} }
   1.190    \label{fig:tour-basic:history}
   1.191  \end{figure}
   1.192  
   1.193 -\subsection{Changesets, revisions, and talking to other 
   1.194 -  people}
   1.195 +\subsection{Changesets, révisions, et discuter avec les autres}
   1.196  
   1.197  As English is a notoriously sloppy language, and computer science has
   1.198  a hallowed history of terminological confusion (why use one term when