[asterisk-dev] please please please open ViewVC for svn.digium.com again

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Sep 5 03:46:55 CDT 2009


On Fri, Sep 04, 2009 at 09:37:53AM -0500, Russell Bryant wrote:

> 2) Install Mercurial (hg)
> 
> 1) Install "hgsvn"
> 
> 2) Import the code (this will take a long time.)
> 
> $ hgimportsvn http://svn.digium.com/svn/asterisk/trunk
> $ cd trunk
> $ hgpullsvn
> ... wait a long time ...
> $ hg serve

Is this only for trunk? Any way to make this work for other branches?

IIRC bzr-svn is likewise only able to track one branch at a time.

Even if you can add branches manually, you'll have to figure out a way
to automate getting the new tags branches (tags/* are explicitly
changing branches in Asterisk. My script makes tags of their heads). And
if you add branches manually: does hgsvn know how to share history
between different branches?

However: can you build from that repository?

Potential issues:

* The generated version.h has odd values. IIRC it makes res_snmp.c go
  mad (or is that only in 1.4)?
* svn:externals, as already mentioned.

> 
> 3) Enjoy your personal web view of the code!
> 
>  -> http://localhost:8000


With git: basically install gitweb and (at least in Debian) symlink the
.git directory to under /var/cache/git/

$ ls -l /var/cache/git/
total 0
lrwxrwxrwx 1 root root 45 2008-08-20 13:21 asterisk.git -> /home/tzafrir/Proj/Asterisk/Git/asterisk/.git
lrwxrwxrwx 1 root root 43 2008-08-20 13:21 libpri.git -> /home/tzafrir/Proj/Asterisk/Git/libpri/.git

Then look at http://localhost/cgi-bin/gitweb.cgi

> 
> A nice benefit of a local view like this is that operations such as
> "annotate" will run faster.
> 
> $ time hg annotate channels/chan_sip.c
> real    0m34.374s
> 
> (on the same LAN as the master svn server)
> $ time svn annotate .../channels/chan_sip.c
> real    2m53.399s

$ time git blame channels/chan_sip.c | cat >/dev/null
real    0m12.105s

:-)

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list