hgbook

diff es/filenames.tex @ 431:f809de31887a

more translation :D

added a term to the glossary
author jerojasro@localhost
date Sun Nov 30 18:41:51 2008 -0500 (2008-11-30)
parents 3afc654d70e5
children 5da084395a69
line diff
     1.1 --- a/es/filenames.tex	Sat Nov 29 23:48:11 2008 -0500
     1.2 +++ b/es/filenames.tex	Sun Nov 30 18:41:51 2008 -0500
     1.3 @@ -30,118 +30,130 @@
     1.4  Los comandos de Mercurial que trabajan con nombres de fichero tienen
     1.5  comportamientos por defecto adecuados cuando son utilizados sin pasar
     1.6  ningún patrón o nombre de fichero. El tipo de comportamiento depende
     1.7 -de lo que haga el comando. Aquí presento unas cuantas 
     1.8 -patterns.  What kind of behaviour you should expect depends on what
     1.9 -the command does.  Here are a few rules of thumb you can use to
    1.10 -predict what a command is likely to do if you don't give it any names
    1.11 -to work with.
    1.12 +de lo que haga el comando. Aquí presento unas cuantas reglas generales
    1.13 +que usted puede usar para que es lo que probablemente hará un comando
    1.14 +si usted no le pasa ningún nombre de fichero con el cual trabajar.
    1.15  \begin{itemize}
    1.16 -\item Most commands will operate on the entire working directory.
    1.17 -  This is what the \hgcmd{add} command does, for example.
    1.18 -\item If the command has effects that are difficult or impossible to
    1.19 -  reverse, it will force you to explicitly provide at least one name
    1.20 -  or pattern (see below).  This protects you from accidentally
    1.21 -  deleting files by running \hgcmd{remove} with no arguments, for
    1.22 -  example.
    1.23 +\item Muchos comandos operarán sobre el directorio de trabajo
    1.24 +    completo. Por ejemplo, esto es lo que hace el comando
    1.25 +    \hgcmd{add},
    1.26 +\item Si el comando tiene efectos difíciles o incluso imposibles de
    1.27 +    revertir, se le obligará a usted a proveer explícitamente al menos
    1.28 +    % TODO revisar ese "lo proteje a usted"
    1.29 +    un nombre o patrón (ver más abajo). Esto lo proteje a usted de,
    1.30 +    por ejemplo, borrar ficheros accidentalmente al ejecutar
    1.31 +    \hgcmd{remove} sin ningún argumento.
    1.32  \end{itemize}
    1.33  
    1.34 -It's easy to work around these default behaviours if they don't suit
    1.35 -you.  If a command normally operates on the whole working directory,
    1.36 -you can invoke it on just the current directory and its subdirectories
    1.37 -by giving it the name ``\dirname{.}''.
    1.38 +
    1.39 +Es fácil evitar este comportamiento por defecto, si no es el adecuado
    1.40 +para usted. Si un comando opera normalmente en todo el directorio de
    1.41 +trabajo, usted puede llamarlo para que trabaje sólo en el directorio
    1.42 +actual y sus subdirectorio pasándole el nombre ``\dirname{.}''.
    1.43  \interaction{filenames.wdir-subdir}
    1.44  
    1.45 -Along the same lines, some commands normally print file names relative
    1.46 -to the root of the repository, even if you're invoking them from a
    1.47 -subdirectory.  Such a command will print file names relative to your
    1.48 -subdirectory if you give it explicit names.  Here, we're going to run
    1.49 -\hgcmd{status} from a subdirectory, and get it to operate on the
    1.50 -entire working directory while printing file names relative to our
    1.51 -subdirectory, by passing it the output of the \hgcmd{root} command.
    1.52 +Siguiendo la misma línea, algunos comandos normalmente imprimen las
    1.53 +rutas de ficheros con respecto a la raíz del repositorio, aún si usted
    1.54 +los llama dentro de un subdirectorio. Dichos comandos imprimirán las
    1.55 +rutas de los ficheros respecto al directorio en que usted se encuentra
    1.56 +si se les pasan nombres explícitos. Vamos a ejecutar el comando
    1.57 +\hgcmd{status} desde un subdirectorio, y a hacer que opere en el
    1.58 +directorio de trabajo completo, a la vez que todas las rutas de
    1.59 +ficheros se imprimen respecto a nuestro subdirectorio, pasándole la
    1.60 +salida del comando \hgcmd{root}.
    1.61  \interaction{filenames.wdir-relname}
    1.62  
    1.63 -\section{Telling you what's going on}
    1.64 -
    1.65 -The \hgcmd{add} example in the preceding section illustrates something
    1.66 -else that's helpful about Mercurial commands.  If a command operates
    1.67 -on a file that you didn't name explicitly on the command line, it will
    1.68 -usually print the name of the file, so that you will not be surprised
    1.69 -what's going on.
    1.70 -
    1.71 -The principle here is of \emph{least surprise}.  If you've exactly
    1.72 -named a file on the command line, there's no point in repeating it
    1.73 -back at you.  If Mercurial is acting on a file \emph{implicitly},
    1.74 -because you provided no names, or a directory, or a pattern (see
    1.75 -below), it's safest to tell you what it's doing.
    1.76 -
    1.77 -For commands that behave this way, you can silence them using the
    1.78 -\hggopt{-q} option.  You can also get them to print the name of every
    1.79 -file, even those you've named explicitly, using the \hggopt{-v}
    1.80 -option.
    1.81 -
    1.82 -\section{Using patterns to identify files}
    1.83 -
    1.84 -In addition to working with file and directory names, Mercurial lets
    1.85 -you use \emph{patterns} to identify files.  Mercurial's pattern
    1.86 -handling is expressive.
    1.87 -
    1.88 -On Unix-like systems (Linux, MacOS, etc.), the job of matching file
    1.89 -names to patterns normally falls to the shell.  On these systems, you
    1.90 -must explicitly tell Mercurial that a name is a pattern.  On Windows,
    1.91 -the shell does not expand patterns, so Mercurial will automatically
    1.92 -identify names that are patterns, and expand them for you.
    1.93 -
    1.94 -To provide a pattern in place of a regular name on the command line,
    1.95 -the mechanism is simple:
    1.96 +\section{Reportar que está pasando}
    1.97 +
    1.98 +El ejemplo con el comando \hgcmd{add} en la sección anterior ilustra
    1.99 +algo más que es útil acerca de los comandos de Mercurial. Si un
   1.100 +comando opera en un fichero que usted no pasó explícitamente en la
   1.101 +línea de comandos, usualmente se imprimirá el nombre del fichero, para
   1.102 +que usted no sea sorprendido por lo que sucede.
   1.103 +
   1.104 +Esto es el principio de \emph{mínima sorpresa}. Si usted se ha
   1.105 +referido explícitamente a un fichero en la línea de comandos, no tiene
   1.106 +mucho sentido repetir esto de vuelta a usted. Si Mercurial está
   1.107 +actuando en un fichero \emph{implícitamente}, porque usted no pasó
   1.108 +nombres, ni directorios, ni patrones (ver más abajo), lo más seguro es
   1.109 +decirle a usted qué se está haciendo.
   1.110 +
   1.111 +Usted puede silenciar a los comandos que se comportan de esta manera
   1.112 +usando la opción \hggopt{-q}.  También puede hacer que impriman el
   1.113 +nombre de cada fichero, aún aquellos que usted indicó explícitamente,
   1.114 +usando la opción \hggopt{-v}.
   1.115 +
   1.116 +\section{Uso de patrones para identificar ficheros}
   1.117 +
   1.118 +Además de trabajar con nombres de ficheros y directorios, Mercurial le
   1.119 +permite usar \emph{patrones} para identificar ficheros. El manejo de
   1.120 +patrones de Mercurial es expresivo.
   1.121 +
   1.122 +En sistemas tipo Unix (Linux, MacOS, etc.), el trabajo de asociar
   1.123 +patrones con nombres de ficheros recae sobre el intérprete de comandos.
   1.124 +En estos sistemas, usted debe indicarle explícitamente a Mercurial que
   1.125 +el nombre que se le pasa es un patrón. En Windows, el intérprete no
   1.126 +expande los patrones, así que Mercurial identificará automáticamente
   1.127 +los nombres que son patrones, y hará la expansión necesaria.
   1.128 +
   1.129 +Para pasar un patrón en vez de un nombre normal en la línea de
   1.130 +comandos, el mecanismo es simple:
   1.131  \begin{codesample2}
   1.132    syntax:patternbody
   1.133  \end{codesample2}
   1.134 -That is, a pattern is identified by a short text string that says what
   1.135 -kind of pattern this is, followed by a colon, followed by the actual
   1.136 -pattern.
   1.137 -
   1.138 -Mercurial supports two kinds of pattern syntax.  The most frequently
   1.139 -used is called \texttt{glob}; this is the same kind of pattern
   1.140 -matching used by the Unix shell, and should be familiar to Windows
   1.141 -command prompt users, too.  
   1.142 -
   1.143 -When Mercurial does automatic pattern matching on Windows, it uses
   1.144 -\texttt{glob} syntax.  You can thus omit the ``\texttt{glob:}'' prefix
   1.145 -on Windows, but it's safe to use it, too.
   1.146 -
   1.147 -The \texttt{re} syntax is more powerful; it lets you specify patterns
   1.148 -using regular expressions, also known as regexps.
   1.149 -
   1.150 -By the way, in the examples that follow, notice that I'm careful to
   1.151 -wrap all of my patterns in quote characters, so that they won't get
   1.152 -expanded by the shell before Mercurial sees them.
   1.153 -
   1.154 -\subsection{Shell-style \texttt{glob} patterns}
   1.155 -
   1.156 -This is an overview of the kinds of patterns you can use when you're
   1.157 -matching on glob patterns.
   1.158 -
   1.159 -The ``\texttt{*}'' character matches any string, within a single
   1.160 -directory.
   1.161 +Un patrón es identificado por una cadena de texto corta que indica qué
   1.162 +tipo de patrón es, seguido por un dos puntos, seguido por el patrón en
   1.163 +sí.
   1.164 +
   1.165 +Mercurial soporta dos tipos de sintaxis para patrones. La que se usa
   1.166 +con más frecuencia  se denomina \texttt{glob}\ndt{Grupo, colección,
   1.167 +aglomeración.}; es el mismo tipo de asociación de patrones usado por
   1.168 +el intérprete de Unix, y también debería ser familiar para los
   1.169 +usuarios de la línea de comandos de Windows.
   1.170 +
   1.171 +Cuando Mercurial hace asociación automática de patrones en Windows,
   1.172 +usa la sintaxis \texttt{glob}.  Por esto, usted puede omitir el
   1.173 +prefijo ``\texttt{glob:}'' en Windows, pero también es seguro usarlo.
   1.174 +
   1.175 +La sintaxis \texttt{re}\ndt{Expresiones regulares.} es más poderosa;
   1.176 +le permite especificar patrones usando expresiones regulares, también
   1.177 +conocidas como regexps.
   1.178 +
   1.179 +A propósito, en los ejemplos siguientes, por favor note que yo tengo
   1.180 +el cuidado de rodear todos mis patrones con comillas sencillas, para
   1.181 +que no sean expandidos por el intérprete antes de que Mercurial pueda
   1.182 +verlos.
   1.183 +
   1.184 +\subsection{Patrones \texttt{glob} estilo intérprete}
   1.185 +
   1.186 +Este es un vistazo general de los tipos de patrones que usted puede
   1.187 +usar cuando está usando asociación con patrone glob.
   1.188 +
   1.189 +La secuencia ``\texttt{*}'' se asocia con cualquier cadena, dentro de
   1.190 +un único directorio.
   1.191  \interaction{filenames.glob.star}
   1.192  
   1.193 -The ``\texttt{**}'' pattern matches any string, and crosses directory
   1.194 -boundaries.  It's not a standard Unix glob token, but it's accepted by
   1.195 -several popular Unix shells, and is very useful.
   1.196 +La secuencia ``\texttt{**}'' se asocia con cualquier cadena, y cruza los
   1.197 +% TODO token
   1.198 +límites de los directorios. No es una elemento estándar de los tokens
   1.199 +de glob de Unix, pero es aceptado por varios intérpretes Unix
   1.200 +populares, y es muy útil.
   1.201  \interaction{filenames.glob.starstar}
   1.202  
   1.203 -The ``\texttt{?}'' pattern matches any single character.
   1.204 +La secuencia ``\texttt{?}'' se asocia con cualquier caracter sencillo.
   1.205  \interaction{filenames.glob.question}
   1.206  
   1.207 -The ``\texttt{[}'' character begins a \emph{character class}.  This
   1.208 -matches any single character within the class.  The class ends with a
   1.209 -``\texttt{]}'' character.  A class may contain multiple \emph{range}s
   1.210 -of the form ``\texttt{a-f}'', which is shorthand for
   1.211 +El caracter ``\texttt{[}'' marca el inicio de una \emph{clase de
   1.212 +caracteres}.  Ella se asocia con cualquier caracter sencillo dentro de
   1.213 +la clase. La clase se finaliza con un caracter ``\texttt{]}''. Una
   1.214 +clase puede contener múltiples \emph{rango}s de la forma
   1.215 +``\texttt{a-f}'', que en este caso es una abreviación para
   1.216  ``\texttt{abcdef}''.
   1.217  \interaction{filenames.glob.range}
   1.218 -If the first character after the ``\texttt{[}'' in a character class
   1.219 -is a ``\texttt{!}'', it \emph{negates} the class, making it match any
   1.220 -single character not in the class.
   1.221 +Si el primer caracter en aparecer después de ``\texttt{[}'' en la
   1.222 +clase de caracteres es un ``\texttt{!}'', se \emph{niega} la clase,
   1.223 +haciendo que se asocie con cualquier caracter sencillo que no se
   1.224 +encuentre en la clase.
   1.225  
   1.226  A ``\texttt{\{}'' begins a group of subpatterns, where the whole group
   1.227  matches if any subpattern in the group matches.  The ``\texttt{,}''