Subversion en consola


descargar un proyecto a la carpeta local:
svn checkout https://(projectname).(domain)/svn/(projectname)/(DIR) (projectname) –username [type-user-name-here]

svn add: añadir un fichero.
svn revert: si te equivocas.
svn blame: viendo el contenido de archivos específicos con la información de revisión y autor.
svn cat: ver el contenido de un archivo específico.
svn cleanup: destrabando una copia de trabajo.
svn copy: copiar un archivo o directorio en la copia de trabajo o en el repositorio.
svn delete/del/remove/rm: borrar un archivo o directorio desde tu copia local.
svn diff file1 file2: ver las diferencias entre archivos.
para comparar el archivo modificado localmente “index.php” contra el que se encuentra en el repositorio, debes tipear:
svn diff $SRC/…../index.html https://(projectname).(domain)/svn/(projectname)/trunk (projectname) –username [type-user-name-here]
svn diff -r 456:459 subfn.cpp
svn export: exportar un directorio limpio de archivos .svn a tu máquina local.
Con este comando puedes extraer una copia sin versionar (sin los archivos .svn) del proyecto, para obtener el directorio sin versionar de cualquier revisión debes escribir:
svn export [-r REV] [PATH]
svn help: ver la ayuda de subversion.
svn commit: subiendo tus cambios.
svn commit -m “Type your comment here” [files]
svn import: importando un archivo o directorio sin versionar al repositorio.
svn info: mostrar información acerca de paths en tu copia de trabajo.
svn list: listar los directorios en el repositorio.
svn log: mostrando los mensajes de log de los commits.
svn log -v .
svn log -r RevisionNumber http://URL/path/file
svn log -l 4 (solo las ultimas 4 entradas)
svn log -v –limit 4 (verbose)
svn log -r 1:HEAD (To list everything in ascending order)
svn log -r HEAD:1 (To list everything in descending order)
svn log -r 13:BASE (To list everything from the thirteenth to the base of the currently checked-out revision in ascending order)
svn log -r {2011-02-02}:{2011-02-03} (To get everything between the given dates)

svn merge: fusionado cambios.
svn mkdir: creando un nuevo directorio.
svn move: moviendo un archivo o directorio.
svn resolved: resolviendo conflictos.
svn status: obteniendo el estado de un archivo o directorio.
svn update: actualizando tu copia de trabajo.

Explicacion de las columnas:
The first column
‘ ‘: No modifications.
‘A’: Item is scheduled for Addition.
‘D’: Item is scheduled for Deletion.
‘M’: Item has been modified.
‘R’: Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place.
‘C’: The contents (as opposed to the properties) of the item conflict with updates received from the repository.
‘X’: Item is related to an externals definition.
‘I’: Item is being ignored (e.g. with the svn:ignore property).
‘?’: Item is not under version control.
‘!’: Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).
‘~’: Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object.

The second column tells the status of a file’s or directory’s properties.
‘ ‘: No modifications.
‘M’: Properties for this item have been modified.
‘C’: Properties for this item are in conflict with property updates received from the repository.

The third column is populated only if the working copy directory is locked. (See the section called “svn cleanup”.)
‘ ‘: Item is not locked.
‘L’:Item is locked.

The fourth column is populated only if the item is scheduled for addition-with-history.
‘ ‘:No history scheduled with commit.
‘+’: History scheduled with commit.

The fifth column is populated only if the item is switched relative to its parent (see the section called “Switching a Working Copy”).
‘ ‘: Item is a child of its parent directory.
‘S’: Item is switched.

The sixth column is populated with lock information.
‘ ‘: When –show-updates is used, the file is not locked. If –show-updates is not used, this merely means that the file is not locked in this working copy.
K: File is locked in this working copy.
O: File is locked either by another user or in another working copy. This only appears when –show-updates is used.
T: File was locked in this working copy, but the lock has been “stolen”and is invalid. The file is currently locked in the repository. This only appears when –show-updates is used.
B: File was locked in this working copy, but the lock has been “broken”and is invalid. The file is no longer locked This only appears when –show-updates is used.

The out-of-date information appears in the seventh column (only if you pass the –show-updates switch).
‘ ‘: The item in your working copy is up-to-date.
‘*’: A newer revision of the item exists on the server.

Realizar un tag:
svn copy http://host/repos/project/trunk http://host/repos/project/tags/TagName-1.4.5 -m “Tag Release 1.4.5”

Para darle un toque de color:
https://github.com/jmlacroix/svn-color/blob/master/svn-color.sh

Anuncios
Subversion en consola