Diferencia entre revisiones de «Usuario:Lmorillas/intro mercurial»

De WikiEducator
Saltar a: navegación, buscar
(Documentación)
(TortoiseHG)
 
(8 revisiones intermedias por el mismo usuario no mostrado)
Línea 3: Línea 3:
 
== ¿Qué es mercurial? ==
 
== ¿Qué es mercurial? ==
 
* http://mercurial.selenic.com
 
* http://mercurial.selenic.com
 +
* http://mercurial.selenic.com/wiki/QuickStart
 +
* Una presentación: http://laboratorios.fi.uba.ar/lse/seminario/material-2010/mercurial.pdf
  
 
== Documentación ==
 
== Documentación ==
 
* http://mercurial.selenic.com/guide/
 
* http://mercurial.selenic.com/guide/
 
* http://mercurial.selenic.com/wiki/UnderstandingMercurial
 
* http://mercurial.selenic.com/wiki/UnderstandingMercurial
 +
* http://www.selenic.com/mercurial/hgrc.5.html
 +
* http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html
 +
 
* Algunos tutoriales sencillos:
 
* Algunos tutoriales sencillos:
 
** http://blog.rvburke.com/2006/08/25/control-de-versiones-con-mercurial-i-conceptos-generales/ (y siguientes)
 
** http://blog.rvburke.com/2006/08/25/control-de-versiones-con-mercurial-i-conceptos-generales/ (y siguientes)
Línea 12: Línea 17:
 
** http://blog.rvburke.com/2006/09/11/control-de-versiones-con-mercurial-iii-publicacion-de-proyectos/
 
** http://blog.rvburke.com/2006/09/11/control-de-versiones-con-mercurial-iii-publicacion-de-proyectos/
 
** http://wiki.amxmodx.org/Mercurial_Tutorial
 
** http://wiki.amxmodx.org/Mercurial_Tutorial
 +
 +
** http://hginit.com/
 +
  
 
== Configuración ==
 
== Configuración ==
* Crea el archivo **~/.hgrc** (o **mercurial.ini** en el directorio home de Windows)
+
* Crea el archivo '''~/.hgrc''' (o '''mercurial.ini''' en el directorio home de Windows)
 
* Añade la sección ui (user interaction) con tu nombre de usuario:
 
* Añade la sección ui (user interaction) con tu nombre de usuario:
 
  [ui]
 
  [ui]
 
  username = Pilar Martínez <pilar.m@micasa.com>
 
  username = Pilar Martínez <pilar.m@micasa.com>
 +
 +
* http://www.selenic.com/mercurial/hgrc.5.html
  
 
== Workflow básico ==
 
== Workflow básico ==
  
 +
=== Clonar proyecto y subir cambios ===
 +
<source lang="bash">
 +
$ hg clone http://selenic.com/repo/hello
 +
$ cd hello
 +
$ (editar archivos)
 +
$ hg add (nuevos archivos)
 +
$ hg commit -m 'Mis cambios'
 +
$ hg push
 +
</source>
 +
 +
===Crear un proyecto y confirmar cambios===
 +
<source lang="bash">
 +
$ hg init (directorio_del_projecto)
 +
$ cd (directorio_del_projecto)
 +
$ (añadir archivos)
 +
$ hg add
 +
$ hg commit -m 'Commit inicial'
 +
</source>
 +
 +
===Comandos hg===
 
<source lang="bash">
 
<source lang="bash">
 
$ hg init project  # inicializa proyecto
 
$ hg init project  # inicializa proyecto
$ cd project
 
$ (add files)
 
 
$ hg add # indica a Mercurial que siga unos ficheros
 
$ hg add # indica a Mercurial que siga unos ficheros
$ (do some changes)
 
 
$ hg diff # muestra cambios
 
$ hg diff # muestra cambios
 
$ hg commit # confirma los cambios
 
$ hg commit # confirma los cambios
Línea 48: Línea 75:
 
* http://tortoisehg.bitbucket.org/manual/2.1/quick.html
 
* http://tortoisehg.bitbucket.org/manual/2.1/quick.html
 
* http://draketo.de/light/english/mercurial/short-introduction-mercurial-tortoisehg
 
* http://draketo.de/light/english/mercurial/short-introduction-mercurial-tortoisehg
 +
 +
; Configuración
 +
: http://tortoisehg.bitbucket.org/manual/2.1/quick.html#configuring-tortoisehg
 +
 +
; Guía rápida
 +
: http://tortoisehg.bitbucket.org/manual/2.1/quick.html
 +
 +
==Mercurial Eclipse ==
 +
* Plugin para eclipse:  http://code.google.com/a/eclipselabs.org/p/mercurialeclipse/
 +
* https://bitbucket.org/mercurialeclipse/main/wiki/Installation%20and%20Configuration
 +
* Tutorial crear repositorio: http://www.javaforge.com/wiki/78696

Última revisión de 17:29 4 oct 2013


¿Qué es mercurial?

Documentación


Configuración

  • Crea el archivo ~/.hgrc (o mercurial.ini en el directorio home de Windows)
  • Añade la sección ui (user interaction) con tu nombre de usuario:
[ui]
username = Pilar Martínez <pilar.m@micasa.com>

Workflow básico

Clonar proyecto y subir cambios

$ hg clone http://selenic.com/repo/hello
$ cd hello
$ (editar archivos)
$ hg add (nuevos archivos)
$ hg commit -m 'Mis cambios'
$ hg push

Crear un proyecto y confirmar cambios

$ hg init (directorio_del_projecto)
$ cd (directorio_del_projecto)
$ (añadir archivos)
$ hg add
$ hg commit -m 'Commit inicial'

Comandos hg

$ hg init project  # inicializa proyecto
$ hg add # indica a Mercurial que siga unos ficheros
$ hg diff # muestra cambios
$ hg commit # confirma los cambios
$ hg cp # copia ficheros y carpetas
$ hg mv # mueve ficheros y carpetas
$ hg log # muestra al historia del repo

Comandos básicos

  • clone - Copies or downloads a repository.
  • add - Adds a file or directory to the local source tree.
  • remove - Removes a file or directory from the local source tree.
  • commit - Commits any local changes to your local source tree.
  • pull - Retrieves changesets from another repository.
  • update - Updates source code with all pending pulled changes.
  • push - Pushes your changesets to a remote repository.
  • merge - Merges two repositories together (explained later)

TortoiseHG

Configuración
http://tortoisehg.bitbucket.org/manual/2.1/quick.html#configuring-tortoisehg
Guía rápida
http://tortoisehg.bitbucket.org/manual/2.1/quick.html

Mercurial Eclipse