Hello community,

here is the log from the commit of package gource for openSUSE:Factory checked 
in at 2013-08-05 20:42:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gource (Old)
 and      /work/SRC/openSUSE:Factory/.gource.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gource"

Changes:
--------
New Changes file:

--- /dev/null   2013-07-23 23:44:04.804033756 +0200
+++ /work/SRC/openSUSE:Factory/.gource.new/gource.changes       2013-08-05 
20:42:38.000000000 +0200
@@ -0,0 +1,142 @@
+-------------------------------------------------------------------
+Mon Jul 22 13:04:37 UTC 2013 - cfarr...@suse.com
+
+- license update: GPL-3.0+
+  No indication of licenses that would restrict the GPL-3.0 license to 3
+  only
+
+-------------------------------------------------------------------
+Tue Jul  2 18:52:40 UTC 2013 - dmitr...@opensuse.org
+
+- Update to version 0.40
+  * Added caption support.
+  * Improved command line interoperability on Windows.
+  * Fixed directory deletion short circuiting processing
+    the rest of a commit.
+  * Fixed issue loading non-ascii user image filenames on windows.
+  * Ignore UTF-8 byte order mark at the start of lines in custom
+    log files.
+  * Fix to boost macros for Macs and non-GNU systems (mistydemeo).
+  * Autotools improvements (flameeyes).
+
+-------------------------------------------------------------------
+Tue Apr 23 12:53:47 UTC 2013 - br...@ioda-net.ch
+
+- Added version dependency in spec libboost >= 1.46 
+- Added new dependency glm-devel > 0.9.3 (devel:library:c_c++)
+
+- updated to 0.39
+       Changes since 0.38:
+
+    Fixed blurry non power of 2 logos.
+    File colour changes now supported in custom logs (rmyorston).
+    Fixed building against Boost 1.50 (svenstaro).
+    Updated boost autoconf macros (flameeyes).
+    Autogen script (matthiaskrgr). 
+
+       Changes since 0.37:
+
+    New high quality sprites.
+    Fullscreen toggle with alt + enter.
+    Window is now resizable. -WIDTHxHEIGHT! creates a non-resizable window.
+    Lowered minimum zoom distance.
+    Use AM_CPPFLAGS in Makefile.am to allow passing custom CPPFLAGS.
+    Don't add files that match the path of a known directory.
+    Fixed divide by zero in text shader causing artifacts on some video cards.
+    Recursively search for repository directory when log-format not specified 
(thanks to Jörg Bachmann for original concept / prototype).
+    New dependency on Boost Filesystem.
+    Doubled the maximum zoom out distance.
+    Allow negative timestamps before 1970 in custom log (artzub).
+    Fix for UTF8-CPP checked.h compilation issue (vszakats).
+    Fixed bug causing missing characters in text.
+    Fixed --highlight-users option not using highlight-colour.
+    highlight-colour default changed to white.
+    Added --selection-colour option (applied to selected users and files).
+    Added --dir-colour option (applied to directories). 
+
+       There are some new dependencies for building this version:
+
+    GLM 0.9.3 (header only library)
+    Boost Filesystem >= 1.46 
+
+-------------------------------------------------------------------
+Fri Nov 11 15:31:01 UTC 2011 - prus...@opensuse.org
+
+- updated to 0.37
+- drop obsolete patch nonvoid.patch (applied upstream)
+
+-------------------------------------------------------------------
+Fri May 27 15:09:42 UTC 2011 - prus...@opensuse.org
+
+- merge package from Contrib
+- updated to version 0.34
+- added two extra tools
+
+-------------------------------------------------------------------
+Wed Apr 13 08:12:29 UTC 2011 - a...@cryptomilk.org
+
+- update to version 0.32
+  * Fixed behaviour of user camera tracking.
+  * Added --with-tinyxml option to configure (use the system TinyXML library).
+  * Fixed crash when SVN log entry contains no 'paths' element.
+  * Handle directory deletion (happens in SVN logs).
+
+-------------------------------------------------------------------
+Tue Feb  8 17:03:05 UTC 2011 - a...@cryptomilk.org
+
+- update to version 0.29
+  * SVN built-in support.
+  * cvs2cl log support (cvs-exp support is now deprecated).
+  * Made camera behaviour when zooming and selecting objects more
+    intuitive.
+  * Improved interactive performance.
+  * Added file extension key (--key or toggled with 'K').
+  * Added mouse-over tool tips.
+  * Added --highlight-colour option.
+  * Added --hash-seed option. The S key now randomizes colours.
+  * Added --output-custom-log option.
+  * Exposed --time-scale option (previously only available
+    interactively).
+  * Removed arbitrary 1024 maximum length limit for log lines.
+  * Fixed two file colouring bugs (quoted files from git, period in
+    file path).
+  * Fix handling of avatars for UTF-8 usernames on MACOSX.
+  * Recover from video mode failing to set due to multi-sampling.
+
+- update to version 0.28
+  * Bazaar support for merged commits (Nick Moffit).
+  * C++ efficiency improvements (Oliver Smith).
+  * Improved cvs-exp log compatibility.
+  * Re-show name of user when adding a new action if user is idle.
+  * Added --padding option to control camera view padding.
+  * More accurate camera tracking (tracks the bounding boxes of
+    objects).
+  * Improved automatic rotation logic. 
+
+- update to version 0.27
+  * Config file support (ini style .conf files) has been added. You
+    can convert a gource command line to a conf file with
+    --save-config CONF_FILE.
+  * Automatic camera rotation has been added which makes better use
+    of the screen space.
+  * Support for logos, titles and background images to brand your
+    gource videos.
+  * Take tga screenshots with F12. Combined with the --transparent
+    option you can can use this to make gource decals. 
+
+-------------------------------------------------------------------
+Tue Apr 13 10:05:42 UTC 2010 - pascal.ble...@opensuse.org
+
+- update to 0.26a:
+  * updated to latest version of GL autoconf macros.
+
+-------------------------------------------------------------------
+Fri Apr  2 16:14:00 UTC 2010 - bitshuffler #s...@irc.freenode.org
+
+- Updated to 0.26
+
+-------------------------------------------------------------------
+Sat Dec  5 02:25:38 UTC 2009 - pascal.ble...@opensuse.org
+
+- initial version (0.18)
+

New:
----
  cvs-exp.pl
  gource-0.40.tar.gz
  gource.changes
  gource.spec
  svn-gource.py

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gource.spec ++++++
#
# spec file for package gource
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           gource
Version:        0.40
Release:        0
Summary:        Software version control visualization tool
License:        GPL-3.0+
Group:          Productivity/Graphics/Visualization/Graph
Url:            http://code.google.com/p/gource/
Source:         http://gource.googlecode.com/files/%{name}-%{version}.tar.gz
Source1:        cvs-exp.pl
Source2:        svn-gource.py
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  boost-devel >= 1.46
BuildRequires:  freetype2-devel
BuildRequires:  ftgl-devel
BuildRequires:  gcc-c++
BuildRequires:  glew-devel
BuildRequires:  glm-devel >= 0.9.3
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  pcre-devel
Requires:       freefont
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Gource is a software version control visualization tool.

Software projects are displayed by Gource as an animated tree
with the root directory of the project at its centre. Directories
appear as branches with files as leaves. Developers can be seen
working on the tree at the times they contributed to the project.

Currently there is first party support for Git and Mercurial,
and third party (using additional steps) for CVS and SVN.

%prep
%setup -q

%build
%configure \
  --enable-ttf-font-dir=%{_datadir}/fonts/truetype
make %{?_smp_flags}

%install
%make_install
install %{SOURCE1} %{buildroot}%{_bindir}/cvs-exp
install %{SOURCE2} %{buildroot}%{_bindir}/svn-gource

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING ChangeLog README THANKS
%doc %{_mandir}/man1/*
%{_bindir}/gource
%{_bindir}/cvs-exp
%{_bindir}/svn-gource
%{_datadir}/gource/

%changelog
++++++ cvs-exp.pl ++++++
#!/usr/bin/perl -w
 
# "cvs log" is reasonably good for tracking changes to a single file, but
# for an entire project with lots of branches and tags, it provides _no_
# idea of what's happening on the whole. This cvs-exp.pl works on the output
# of cvs log and arranges events chronologically, merging entries as needed.
# by keeping track of lists of files and revisions, it figures when in the
# sequence of events were various tags and branches created. It prints out a
# cute-looking tree at the end to summarize activity in the repository.
#
# cvs-exp.pl: a global-picture chronological "cvs log" postprocessor
# author: Sitaram Iyer <ssi...@cs.rice.edu> 11jan00, one afternoon's work
# Copyright (C) 2000 Rice University
# available at http://www.cs.rice.edu/~ssiyer/code/cvs-exp/
#
# cvs-exp.pl, a wrapper around (and a spoof of) the "cvs log" command, is a
# way of chronologically tracking events in a cvs repository, when you're
# lost among lots of branches and tags and little idea of what's going on.
#
# CHANGELOG
#
# Bugfix contributed by Adam Bregenzer <a...@bregenzer.net> on Oct 24, 2002
# to allow for spaces in filenames.
#
# david.fl...@ugs.com (July 2004):
# added -before, -changeset, -search, -info, -last, and -remote functions.
#
# Bugfix from Peter Conrad <con...@tivano.de> on Nov 30, 2004
# to remove a superfluous line with a "," if a file has a long pathname

# so two reasons for writing this:
#  * I managed a CVS repository for a tolerably largeish project recently,
#    and had lots of trouble keeping up with the overall state of the
#    project, especially when people kept making mistakes of committing to
#    the wrong branches etc. This would've proved quite useful then.
#  * I like writing _long_ cvs commit descriptions, so a significant part of
#    documentation in my code happens to be scattered among a gazillion
#    files in a CVS repository, and I wouldn't mind merging them nicely and
#    chronologically.

# status:
#   sorting and merging text - sortof.
#   list of files changed - yes
#   tag support - yes: 'twas hard
#   vendor tag support - yes
#   branch support - yes

# NOTE: a newly created branch with no commits inside will not show up.
#       this is because CVS works that way, and nothing can be done.
#
# NOTE: tagging files in a new branch will really tag the parent. weird CVS.
#
# NOTE: create branch, it says CREATE BRANCH, then add some files onto the
#       trunk, and it says CREATE BRANCH again for *those* files. this is
#       really what happens, since the branch is created for those files
#       only at that point. so this isn't a bug either.
#
# BUGS: infinite nesting in e.g.413.
#
# BUGS: sorting is not polished up yet, so sometimes entries with almost the
#       same timestamp are repeated - e.g. with Initial revision and Import

use strict;
my $opt_files = 1;
my $opt_log = 1;
my $opt_tree = 1;
my $cset = 0;
my $log = "log";
my $before = 0;
my $lastonly = 0;
my $searchstring = 0;
my $searchdate = 0;
my $case = "";
my @dirs;

while ($#ARGV >= 0) {
        for ($ARGV[0]) {
                /-nofiles/ && do {
                        shift; $opt_files = 0; 
                        last;
                };

                /-nolog/ && do {
                        shift; $opt_log = 0;
                        last;
                };

                /-notree/ && do {
                        shift; $opt_tree = 0;
                        last;
                };

                /-c.*/ && do {
                        shift; $cset = shift;
                        last;
                };

                /-s.*/ && do {
                        shift; $searchstring = shift;
                        last;
                };

                /-i.*/ && do {
                        shift; $searchdate = shift;
                        last;
                };

                /-l.*/ && do {
                        shift; $lastonly = 1;
                        last;
                };

                /-h.*/ && do {
                        usage();
                        exit();
                };      

                /-b.*/ && do {
                        shift; $before = 1;
                        last;
                };

                /-r.*/ && do {
                        shift; $log = "rlog";
                        last;
                };
                /.*/ && do {
                        push(@dirs, (shift));
                        last;
                };      
        }
}       

if (-t) {
  open(CVS, "cvs $log ".join(' ',@dirs)." 2> /dev/null |") || die "can't 
execute cvs: $!\n";
} else {
  *CVS = *STDIN;
}

my $dash = "-"x28;
my $ddash = "="x77;
my $inheader = 1; 
my %symbtag = (); 
my %tagnfiles = ();

my ($file, $branch, %d, $txt, $rev, $date, %tagnfiles1, @commitTable); 

# create an array of hashes (@commitTable) containing entries for each commit.
fileentry:
while (<CVS>) { 
  chomp;
  if (!$inheader && ($_ eq $dash || $_ eq $ddash)) {
    my $k = join(' ', map { s/\s*;$//; "$file:$_" } (split(/\s+/,$branch)));
    %d = ( 'file'       => $file,
           'frev'       => "$file:$rev",
           'txt'        => $txt,
           'rev'        => $rev,
           'date'       => $date,
           'branch'     => $k,
         );
    push @commitTable, { %d };
  }

  if ($_ eq $dash) {
    $inheader = 0;
    $_ = <CVS>; chomp; s/revision\s*//; $rev = $_;
    $_ = <CVS>; chomp; $date = $_;
    $_ = <CVS>; chomp;
    $txt = "";
    $branch = (/^branches:\s*(.*)$/) ? $1 : do { $txt .= "$_\n"; ""; };
  } elsif ($_ eq $ddash) {
    $inheader = 1; undef $file;
    next fileentry;
  } else {
    if ($inheader) {
#      $file = $1 if (/^Working file: (.*)$/);
      $file = $1 if (/^RCS file: (.*)(,v)?$/);
      if (/^\t([^\s]*)\s*:\s*([^\s]*)\s*$/) {
        die if (!defined($file));
        my ($tag,$ver) = ($1,$2);

        # if $ver has an even number of dot-separateds and the
        # second-to-last is zero, then wipe it. this is a branch.
        my @ver = split(/\./,$ver);
        $ver = join('.',(@ver[0..$#ver-2],$ver[$#ver]))
          if ($#ver >= 1 && ($#ver % 2) && $ver[$#ver-1] eq "0");

        defined($tagnfiles{$tag}) ?
          do { $tagnfiles{$tag}++ } :
          do { $tagnfiles{$tag} = 1 };
        my @t = (defined($symbtag{$file}{$ver}) ?
            @{ $symbtag{$file}{$ver} } : ());
        push @t, $tag;
        $symbtag{$file}{$ver} = [ @t ];
      }
    } else {
      $txt .= "$_\n";
    }
  }
}

foreach (keys(%tagnfiles)) { $tagnfiles1{$_} = $tagnfiles{$_}; } # backup

@commitTable = sort { cmpval($a) cmp cmpval($b) } @commitTable;

# merge consecutive entries with the same text - not all entries, note.
my $m = "garbage";
my @mtable = ();

foreach (@commitTable) {
  my %entry = %{$_};
  if ($m eq $entry{txt}) { # then skip
    $mtable[$#mtable]{frev} .= " " . $entry{frev};
    $mtable[$#mtable]{file} .= " " . $entry{file};
    foreach my $tag (@{ $symbtag{$entry{file}}{$entry{rev}} }) {
      $tagnfiles{$tag}--;
      unshift (@{$mtable[$#mtable]{tags}},$tag) if ($tagnfiles{$tag} <= 0);
    }
  } else {
    $m = $entry{txt};
    $entry{tags} = ();
    foreach my $tag (@{ $symbtag{$entry{file}}{$entry{rev}} }) {
      $tagnfiles{$tag}--;
      unshift (@{$entry{tags}},$tag) if ($tagnfiles{$tag} <= 0);
    }
    push @mtable, { %entry };
  }
}

# Having slurped in all the info. from the 'cvs log' command, now figure out
# how to output it.

my %child = ();
my $iter = 0;

# return revision numbers of *all* files as they were prior to commit ($cset).
if ($before) {          
        unless ($cset) {
                print "A -changeset value must be provided for this option.\n";
        }       
        my (%entry, %latest) = ();
        xprint("State of repository before change ",sprintf("%06u:\n", $cset)); 
        for (my $i = 0; $i<$cset; $i++) {
                %entry = %{$mtable[$i]};
                foreach (split(/ /,$entry{frev})) {
                        my ($file, $rev) = split(/:/);
                        $latest{$file} =$rev;
                }       
        }
                 
        %entry = %{$mtable[$cset]};
        my $b = brname($entry{frev});
        ($b ne "") && xprint("BRANCH [$b]\n");
        xprint("$entry{txt}\n");
        xprint("($entry{date})\n");
        foreach (sort keys %latest) {
                xprint($_,":",$latest{$_},"\n");
        }        
        
        foreach (@{$entry{tags}}) {
                xprint("*** CREATE TAG [$_]" . nfiles($_));
                push @{$child{$b}}, "t $_";
        }
        foreach (split(/\s+/,brname($entry{branch}))) {
                xprint("*** CREATE BRANCH [$_]" . nfiles($_));
                push @{$child{$b}}, "b $_";
        }
        xprint("" . ("="x78) . "\n");
        exit(0);
}

# return data only on a single specific change, then exit.
# re-arrange the output format to make life easy for cvs-undo.pl
if ($cset) {            
        xprint(sprintf("\n%06u:\n", $cset));    
        my %entry = %{$mtable[$cset]};
        my $b = brname($entry{frev});
        ($b ne "") && xprint("BRANCH [$b]\n");
        xprint("$entry{txt}\n");
        xprint("($entry{date})\n");
        xprint(join("\n",split(/ /,$entry{frev})) . "\n"); 
        
        foreach (@{$entry{tags}}) {
                xprint("*** CREATE TAG [$_]" . nfiles($_));
                push @{$child{$b}}, "t $_";
        }
        foreach (split(/\s+/,brname($entry{branch}))) {
                xprint("*** CREATE BRANCH [$_]" . nfiles($_));
                push @{$child{$b}}, "b $_";
        }
        xprint("" . ("="x78) . "\n");
        exit(0);
}

# return data on all changes whose date component matches '$searchdate', then
# exit.
if ($searchdate) {
        my $nseen = 0;
        my $laststring = "";
        ($lastonly) && ($laststring = "last instance of ");
        print "Searching for $laststring\'$searchdate\'\n";
        for (my $i = 0; $i <= $#mtable; $i++) {
                my %entry = %{$mtable[$i]};
                if ($entry{'date'} =~ /$searchdate/) {
                        $nseen = $i;
                        unless ($lastonly) {
                                xprint(sprintf("\n%06u:", $i)); 
                                my $b = brname($entry{frev});
                                ($b ne "") && xprint("\nBRANCH [$b]\n");
                                xprint("\n($entry{date})\n");
                                xprint(wraprint($entry{frev},77,"  | ",",") . 
"\n  `" . ("-"x40) . "\n"); 
                                xprint("\n$entry{txt}\n");
                                foreach (@{$entry{tags}}) {
                                        xprint("*** CREATE TAG [$_]" . 
nfiles($_));
                                        push @{$child{$b}}, "t $_";
                                }
                                foreach (split(/\s+/,brname($entry{branch}))) {
                                        xprint("*** CREATE BRANCH [$_]" . 
nfiles($_));
                                        push @{$child{$b}}, "b $_";
                                }
                                xprint("" . ("="x78) . "\n");
                        }
                }       
        }
        if (($lastonly) && ($nseen)) {
                my %entry = %{$mtable[$nseen]};
                xprint(sprintf("\n%06u:", $nseen));     
                my $b = brname($entry{frev});
                ($b ne "") && xprint("\nBRANCH [$b]\n");
                xprint("\n($entry{date})\n");
                xprint(wraprint($entry{frev},77,"  | ",",") . "\n  `" . 
("-"x40) . "\n"); 
                xprint("\n$entry{txt}\n");
                foreach (@{$entry{tags}}) {
                        xprint("*** CREATE TAG [$_]" . nfiles($_));
                        push @{$child{$b}}, "t $_";
                }
                foreach (split(/\s+/,brname($entry{branch}))) {
                        xprint("*** CREATE BRANCH [$_]" . nfiles($_));
                        push @{$child{$b}}, "b $_";
                }
                xprint("" . ("="x78) . "\n");
        }
                
        print "No relevant entries found\n" if not ($nseen);
        exit(0);
}

# return data on all changes whose text component matches '$searchstring', then
# exit.
if ($searchstring) {
        my $nseen = 0;
        print "Searching for \'$searchstring\'\n";
        foreach (@mtable) {
                my %entry = %{$_};
                if ($entry{'txt'} =~ /$searchstring/) {
                        $nseen++;
                        xprint(sprintf("\n%06u:", $iter));      
                        my $b = brname($entry{frev});
                        ($b ne "") && xprint("\nBRANCH [$b]\n");
                        xprint("\n($entry{date})\n");
                        xprint(wraprint($entry{frev},77,"  | ",",") . "\n  `" . 
("-"x40) . "\n"); 
                        xprint("\n$entry{txt}\n");
                        foreach (@{$entry{tags}}) {
                                xprint("*** CREATE TAG [$_]" . nfiles($_));
                                push @{$child{$b}}, "t $_";
                        }
                        foreach (split(/\s+/,brname($entry{branch}))) {
                                xprint("*** CREATE BRANCH [$_]" . nfiles($_));
                                push @{$child{$b}}, "b $_";
                        }
                        xprint("" . ("="x78) . "\n");
                }
                $iter++;
        }
        print "No relevant entries found\n" if not ($nseen);
        exit(0);
}

# return all data, with changeset number prepended.
foreach (@mtable) {
        xprint(sprintf("\n%06u:", $iter));      
        my %entry = %{$_};
        my $b = brname($entry{frev});
        ($b ne "") && xprint("\nBRANCH [$b]\n");
        xprint("\n($entry{date})\n");
        ($opt_files) &&  
                xprint(wraprint($entry{frev},77,"  | ",",") . "\n  `" . 
("-"x40) . "\n"); 
        xprint("\n$entry{txt}\n");
        foreach (@{$entry{tags}}) {
                xprint("*** CREATE TAG [$_]" . nfiles($_));
                push @{$child{$b}}, "t $_";
        }
        foreach (split(/\s+/,brname($entry{branch}))) {
                xprint("*** CREATE BRANCH [$_]" . nfiles($_));
                push @{$child{$b}}, "b $_";
        }
        xprint("" . ("="x78) . "\n");
        $iter++;
}

my %seen = ();

do { print "HEAD\n"; print_branch("", ()); } if ($opt_tree);

### End main ###

sub nfiles { " <$tagnfiles1{$_[0]} file".($tagnfiles1{$_[0]}==1?"":"s").">\n" }

sub xprint { print @_ if ($opt_log); }

sub brname {
  my %b = ();
  my $line = $_[0];
  while ($line =~ s/(.+?):([0-9.]+)\s*//) {
    my $file = $1;
    my $ver = $2;
    $ver =~ s/;$//;
    my @ver = split(/\./,$ver);
    pop @ver if ($#ver % 2);
    $ver = join('.',@ver);
    my $x = $symbtag{$file}{$ver};
    $b{@{$x}[0]} = 1 if (defined($x));
  }
  return join(' ',keys(%b));
}

# complicated sort/merge:
# sort on timestamp, largely.
# however, if two entries have the same hours and minutes, then *merge* on
# text and sort on timestamp of the first one anyway.
# XXX ABOVE NOT YET FULLY IMPLEMENTED.
sub cmpval {
  my %a = %{$_[0]}; my $s = $a{date};
  $s =~ s/^([^:]*:[^:]*:[^:]*):.*/$1/; $s.$a{rev}.$a{txt}.$a{frev};
}

sub wraprint {
  my $n = $_[1];
  my $pad = $_[2];
  my $join = $_[3];
  my $len = 0;
  my $res = "";
  my $line = $_[0];
  while ($line =~ s/(.+?:[0-9.]+)\s*//) {
    if ($len + length($1) + 2 < $n) {
      do { $res .= "$join "; $len += 1+length($join); } if ($res ne "");
    } elsif ($len > 0) {
      $res .= "$join\n"; $len = 0;
    }
    do { $res .= $pad; $len += length($pad); } if ($len == 0);
    $res .= $1; $len += length($1);
  }
  return $res;
}

sub print_branch {
  $seen{$_[0]} = 1;
  my $t = $child{$_[0]};
  my @t = (defined($t)?@{$t}:());
  shift;
  my @were_last = @_;
  my $am_last = 0;
  foreach (@t) {
    $am_last = 1 if ($_ eq $t[$#t]);
    /^(.) (.*)/; my $tb = $1; $_ = $2;
    print(join('',map {($_?" ":"|")."  "} @were_last).($am_last?"`":"|")."- 
".($tb eq "b"?"[":"")."$_".($tb eq "b"?"]":"").nfiles($_))
      if ($tb ne "b" || !defined($seen{$_}));
    print_branch($_, (@were_last,$am_last))
      if ($tb eq "b" && !defined($seen{$_}));
  }
}
sub usage {
        print "Usage:\n",
        "    cvs-exp.pl [opts] [arguments to cvs log] [dir]\n",
        "or  cvs log | cvs-exp.pl [opts] \n",
        "\n",
        "cvs-exp.pl creates a chronological view of the commits, tags, and 
branching\n",
        "events within a CVS module or set of CVS modules. cvs-exp.pl uses the 
'cvs log'\n",
        "(or 'cvs rlog') command to gather raw materials for formatted 
output.\n",
        "\n",
        "Options:\n",
        "   -nolog           don't do the log; only show the tag tree at the 
end\n",
        "   -notree          vice versa - the default is to print both.\n",
        "   -nofiles         don't list files in the log\n",
        "\n",
        "                   The previous three options are overridden by the\n",
        "                   following options:\n",
        "\n",
        "   -before          return version information for all files as they 
were\n",
        "                    before a given changeset. (Requires -changeset 
.)\n",
        "   -changeset nn    return information on specific checkin nn\n",
        "   -search str      search for all commits whose comments match the 
regular\n",
        "                    expression 'str'\n",
        "   -info str        search for all commits whose date or author match 
the\n",
        "                    regular expression 'str'\n",
        "   -last            return only the most recent commit matching a 
search\n",
        "                    (only meaningful with the '-info' option)\n",
        "   -remote          use 'cvs rlog' rather than 'cvs log'\n",
        "   -help            when all else fails\n";
}       
++++++ svn-gource.py ++++++
#!/usr/bin/python
## Copyright (c) 2009 Cameron Hart (c...@bitshifter.net.nz)
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
## 1. Redistributions of source code must retain the above copyright
##    notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above copyright
##    notice, this list of conditions and the following disclaimer in the
##    documentation and/or other materials provided with the distribution.
## 3. The name of the author may not be used to endorse or promote products
##    derived from this software without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
## INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
## NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
## THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
import time
import getopt
import re
from xml.etree import ElementTree

opt_filter_dirs = False

_USAGE = """
svn-gource.py [--help] [--filter-dirs] <file>

The input file must be the output of the command svn log --verbose --xml.
"""

# regular expression for matching any file with an extension
extn_prog = re.compile(".*/?[^/]+\.[^\.]+$")

def reverse(data):
    """Returns the log entries in reverse."""
    for index in range(len(data)-1, -1, -1):
        yield data[index]

def processXmltree(xmltree):
    global opt_filter_dirs
    for logentry in reverse(xmltree.getiterator("logentry")):
        datetext = logentry.find("date").text

        # svn xml logs always use UTC
        timestamp = (time.mktime(time.strptime(datetext[:-8], 
"%Y-%m-%dT%H:%M:%S")))
        # a bit of a hack to get it into local time again...
        #timestamp = timestamp - time.timezone

        #author might not exist
        try:
            author = logentry.find("author").text
        except:
            author = ""

        # output all affected files
        for pathentry in logentry.getiterator("path"):

            # apply directory filtering strategy
            if opt_filter_dirs and not re.match(extn_prog, pathentry.text):
                continue;

            # join output
            print( "|".join( ( "%d" % int(timestamp), "%s" % 
author.encode("utf-8"), "%s" % pathentry.get("action"), "%s" % 
pathentry.text.encode("utf-8"), "" ) ) )

def printUsage(message):
    sys.stderr.write(_USAGE)
    if message:
        sys.exit('\nFATAL ERROR: ' + message)
    else:
        sys.exit(1)

def processArguments():
    global opt_filter_dirs

    try:
        opts, filenames = getopt.getopt(sys.argv[1:], '', ['help', 
'filter-dirs'])
    except getopt.GetoptError:
        printUsage('Invalid arguments.')

    for (opt, val) in opts:
        if opt == '--help':
            printUsage(None)
        elif opt == '--filter-dirs':
            opt_filter_dirs = True

    if not filenames:
        printUsage('No input file specified.')

    return filenames[0]


if __name__ == "__main__":
    filename = processArguments()

    xmltree = ElementTree.parse(filename)

    processXmltree(xmltree)



-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to