Subversion To Mercurial

78 %
22 %
Information about Subversion To Mercurial
Technology

Published on August 24, 2009

Author: ladislavprskavec

Source: slideshare.net

Description

Migration from Subversion to Mercurial

1. Migration from Subversion to Mercurial Ladislav Prskavec http://blog.prskavec.net ladislav.prskavec@gmail.com OpenMeeting 27.9.2009

2. Why Mercurial ? Bitbucket.org (php-frameworks.net) Google Code (php4hudson, phpchangelogs) Keywords (phpdoc, git not support) Revisions (git not support) Netbeans (native support) Eclipse plugin (Zend Studio) http://www.vectrace.com/mercurialeclipse/ Many extensions Negatives partial rebase (extension) experimental subrepos in Mercurial 1.3.1 (svn:externals)

3. Why Mercurial ? Bitbucket.org (private rep, issues)

4. SVN xml logs to Hg Question: How make svn log --xml Answer: hglog.sh echo '<?xml version="1.0"?>n<log>n' >$1.xml hg log --template '<logentry revision="{rev}"> <author>{author|obfuscate}</author> <date>{date|isodate}</date> <msg>{desc|escape}n</msg> <paths><path>{files}</path></paths> </logentry>n' $1/ >>$1.xml echo '</log>n' >>$1.xml

5. RCS keywords Question: How make keywords? Answer: Keywords extension (part from .hgrc) [extensions] hgext.keyword = keyword=/usr/share/python-support/mercurial-common/hgext/keyword.py [keyword] **.php = **.xml = [keywordmaps] RCSFile = {file|basename},v Author = {author|user} Header = {root}/{file},v {node|short} {date|utcdate} {author|user} Source = {root}/{file},v Date = {date|utcdate} Id = {file|basename},v {node|short} {date|utcdate} {author|user} Revision = {node|short}

6. Deployment SVN deployment script svn --force export http://svn.rep.cz/svn/project/trunk/ /srv/www/project.cz/ /usr/bin/svn2cl --strip-prefix=trunk --break-before-msg=2 --group-by-day --separate-daylogs -i -- authors=/srv/www/project.cz/application/configs/authors.xml http://svn.rep.cz/svn/project/trunk -o /srv/www/project. cz/changelog sed -i 's/development/production/g' /srv/www/project.cz/public/.htaccess chown -Rf www-data:www-data /srv/www/project.cz/ Mercurial deployment script cd ~/hg-ws/project.cz/ hg pull hg up hg archive /srv/www/project.cz/ sed -i 's/development/production/g' /srv/www/project.cz/public/.htaccess chown -Rf www-data:www-data /srv/www/project.cz/

7. Hooks scripts Subversion (server, repos/hooks/pre-commit) #!/bin/sh REPOS="$1" TXN="$2" # check php CHANGED=`svnlook changed -t "$TXN" "$REPOS" | awk '{print $2}' | grep .php$` for FILE in $CHANGED do MESSAGE=`svnlook cat -t "$TXN" "$REPOS" "$FILE" | $PHP -l ` if [ $? -ne 0 ] then exit 1 fi done exit 0 Mercurial (in .hg/hgrc) [hooks] precommit = test `find -name *.php -exec php -l {} ; | wc -l` -eq 1

8. Summary Evolution not revolution Some workflow for my projects in Mercurial and Svn Local commits hg backout hg rollback (working only localy) Check extensions http://mercurial.selenic.com/wiki/UsingExtensions Convert (from others SCM: cvs, svn, git, darcs, bzr, arch, mnt) Fetch Keyword Notify Rebase Record (staging area)

9. Thanks for your attention http://slideshare.net/ladislavprskavec Ladislav Prskavec http://blog.prskavec.net ladislav.prskavec@gmail.com

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

WorkingWithSubversion - Mercurial

Working with Subversion (SVN) Interoperating with SVN is possible with third-party tools or existing extensions. This page will detail the options and ...
Read more

Convert from Subversion to Mercurial - Atlassian Documentation

This page discusses the options for converting from Subversion to Mercurial.
Read more

ConvertExtension - Mercurial

1. Overview. The Convert extension converts repositories from other SCMs (or even Mercurial itself) into Mercurial or (with limits) Subversion repositories ...
Read more

svn - Converting from Mercurial to Subversion - Stack Overflow

Due to lack of Mercurial support in several tools, and managerial oppression it has become necessary to convert several trial Mercurial repositories to ...
Read more

SVN, Git, Mercurial – Comparison of Version Control Software

XP-Dev.com – Subversion, GIT and Mercurial hosting. A decent feature set and represent excellent value for money. From $5 a month with unlimited projects ...
Read more

version control - How to migrate/convert from SVN to ...

How to migrate/convert from SVN to Mercurial (hg) on windows. up vote 119 down vote favorite. 53. ... How can I convert a subversion repository to Mercurial?
Read more

Migrating from Subversion to Mercurial | manski's blog

I’ve been working for quite some time now with Subversion but recently fell in love with Mercurial. Mercurial (like GIT or Bazaar) is a distributed ...
Read more

Converting from Subversion to Mercurial | SNH

Converting from Subversion to Mercurial Sam Hart 2007-05-24 00:19:22. As I said in my last entry, I've been evaluating the various modern DVCSes to try and ...
Read more

Versionshelf: Git, Subversion und Mercurial Hosting ...

Git, Subversion und Mercurial Hosting - Einfach und Sicher. Unkomplizierte Versionsverwaltung für dich und dein Team.
Read more

Mercurial - Wikipedia, the free encyclopedia

Mercurial, a cross-platform, ... "Subversion or CVS, Bazaar or Mercurial? Four open source version control systems compared", Java World, ...
Read more