[Pkg-bazaar-commits] ./bzr-stats/unstable r25: Package new upstream with copyright headers.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:20:16 UTC 2009


------------------------------------------------------------
revno: 25
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: debian
timestamp: Mon 2008-08-04 21:51:54 +0200
message:
  Package new upstream with copyright headers.
modified:
  __init__.py
  classify.py
  debian/changelog
  test_classify.py
    ------------------------------------------------------------
    revno: 10.2.16
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Mon 2008-08-04 21:49:51 +0200
    message:
      Add copyright headers.
    modified:
      __init__.py
      classify.py
      test_classify.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2008-07-17 09:05:33 +0000
+++ b/__init__.py	2008-08-04 19:49:51 +0000
@@ -1,3 +1,18 @@
+# Copyright (C) 2005-2008 Canonical Ltd
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 """A Simple bzr plugin to generate statistics about the history."""
 
 import re

=== modified file 'classify.py'
--- a/classify.py	2008-06-28 20:07:45 +0000
+++ b/classify.py	2008-08-04 19:49:51 +0000
@@ -1,6 +1,21 @@
+# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 """Classify a commit based on the types of files it changed."""
 
-from bzrlib import urlutils 
+from bzrlib import urlutils
 from bzrlib.trace import mutter
 
 
@@ -12,22 +27,21 @@
         None if determining the file type failed.
     """
     # FIXME: Use mime types? Ohcount? 
-    basename = urlutils.basename(name)
-    try:
-        extension = basename.split(".")[1]
-        if extension in ("c", "h", "py", "cpp", "rb", "ac"):
-            return "code"
-        if extension in ("html", "xml", "txt", "rst", "TODO"):
-            return "documentation"
-        if extension in ("po"):
-            return "translation"
-        if extension in ("svg", "png", "jpg"):
-            return "art"
-    except IndexError:
+    extension = os.path.splitext(name)[1]
+    if extension in (".c", ".h", ".py", ".cpp", ".rb", ".pm", ".pl", ".ac"):
+        return "code"
+    if extension in (".html", ".xml", ".txt", ".rst", ".TODO"):
+        return "documentation"
+    if extension in (".po",):
+        return "translation"
+    if extension in (".svg", ".png", ".jpg"):
+        return "art"
+    if not extension:
+        basename = urlutils.basename(name)
         if basename in ("README", "NEWS", "TODO", 
                         "AUTHORS", "COPYING"):
             return "documentation"
-        if basename in ("Makefile"):
+        if basename in ("Makefile",):
             return "code"
 
     mutter("don't know how to classify %s", name)

=== modified file 'debian/changelog'
--- a/debian/changelog	2008-07-25 18:49:05 +0000
+++ b/debian/changelog	2008-08-04 19:51:54 +0000
@@ -1,4 +1,4 @@
-bzr-stats (0.0.1~bzr25-1) unstable; urgency=low
+bzr-stats (0.0.1~bzr26-1) unstable; urgency=low
 
   * Initial release. (Closes: #491103)
 

=== modified file 'test_classify.py'
--- a/test_classify.py	2008-06-28 18:54:37 +0000
+++ b/test_classify.py	2008-08-04 19:49:51 +0000
@@ -1,3 +1,18 @@
+# Copyright (C) 2008 Jelmer Vernooij <jelmer at samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 from bzrlib.tests import TestCase
 from bzrlib.plugins.stats.classify import classify_filename, classify_delta
 



More information about the Pkg-bazaar-commits mailing list