Merge refactoring of report-status parsing.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 30 May 2010 14:49:14 +0000 (16:49 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 30 May 2010 14:49:14 +0000 (16:49 +0200)
38 files changed:
HACKING
NEWS
bin/dul-daemon
bin/dul-receive-pack
bin/dul-upload-pack
bin/dul-web
bin/dulwich
dulwich/__init__.py
dulwich/_objects.c
dulwich/client.py
dulwich/fastexport.py
dulwich/index.py
dulwich/lru_cache.py
dulwich/misc.py
dulwich/objects.py
dulwich/pack.py
dulwich/patch.py
dulwich/protocol.py
dulwich/repo.py
dulwich/server.py
dulwich/tests/__init__.py
dulwich/tests/compat/test_client.py
dulwich/tests/compat/test_pack.py
dulwich/tests/compat/test_server.py
dulwich/tests/compat/test_web.py
dulwich/tests/test_fastexport.py
dulwich/tests/test_file.py
dulwich/tests/test_index.py
dulwich/tests/test_object_store.py
dulwich/tests/test_objects.py
dulwich/tests/test_pack.py
dulwich/tests/test_patch.py
dulwich/tests/test_protocol.py
dulwich/tests/test_repository.py
dulwich/tests/test_server.py
dulwich/tests/test_web.py
dulwich/web.py
setup.py

diff --git a/HACKING b/HACKING
index c68fd0610435b184022ac233f3701ded3f3419f3..70c876eb765794c735d05822f7cf2a1726a93af8 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,5 +1,8 @@
 Please follow PEP8 with regard to coding style.
 
-All functionality should be available in pure Python. Optional C implementations
-may be written for performance reasons, but should never replace the Python 
-implementation. The C implementations should follow the kernel/git coding style.
+All functionality should be available in pure Python. Optional C
+implementations may be written for performance reasons, but should never
+replace the Python implementation. The C implementations should follow the
+kernel/git coding style.
+
+Where possible please include updates to NEWS along with your improvements.
diff --git a/NEWS b/NEWS
index aba94fc7317f112662631f24e6c6fd85ecc5cc7d..394d83ae1b1beb41e26539b24ab1827d23c01d37 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,21 @@
-0.5.1  UNRELEASED
+0.6.1  UNRELEASED
+
+ BUG FIXES
+
+  * Fix memory leak in C implementation of sorted_tree_items. (Dave Borowitz)
+
+ TESTS
+
+  * Add tests for sorted_tree_items and C implementation. (Dave Borowitz)
+
+ CLEANUP
+
+  * Clean up file headers. (Dave Borowitz)
+
+
+0.6.0  2010-05-22
+
+note: This list is most likely incomplete for 0.6.0.
 
  BUG FIXES
  
   * Cope with \r in ref files on Windows. (
        http://github.com/jelmer/dulwich/issues/#issue/13, Jelmer Vernooij)
 
+  * Fix GitFile breakage on Windows. (Anatoly Techtonik, #557585)
+
+  * Support packed ref deletion with no peeled refs. (Augie Fackler)
+
+  * Fix send pack when there is nothing to fetch. (Augie Fackler)
+
+  * Fix fetch if no progress function is specified. (Augie Fackler)
+
+  * Allow double-staging of files that are deleted in the index. 
+    (Dave Borowitz)
+
+  * Fix RefsContainer.add_if_new to support dangling symrefs.
+    (Dave Borowitz)
+
+  * Non-existant index files in non-bare repositories are now treated as 
+    empty. (Dave Borowitz)
+
+  * Always update ShaFile.id when the contents of the object get changed. 
+    (Jelmer Vernooij)
+
+  * Various Python2.4-compatibility fixes. (Dave Borowitz)
+
+  * Fix thin pack handling. (Dave Borowitz)
  FEATURES
 
   * Add include-tag capability to server. (Dave Borowitz)
   * New dulwich.fastexport module that can generate fastexport 
     streams. (Jelmer Vernooij)
 
+  * Implemented BaseRepo.__contains__. (Jelmer Vernooij)
+
+  * Add __setitem__ to DictRefsContainer. (Dave Borowitz)
+
+  * Overall improvements checking Git objects. (Dave Borowitz)
+
+  * Packs are now verified while they are received. (Dave Borowitz)
+
  TESTS
 
   * Add framework for testing compatibility with C Git. (Dave Borowitz)
 
+  * Add various tests for the use of non-bare repositories. (Dave Borowitz)
+
+  * Cope with diffstat not being available on all platforms. 
+    (Tay Ray Chuan, Jelmer Vernooij)
+
+  * Add make_object and make_commit convenience functions to test utils.
+    (Dave Borowitz)
+
  API BREAKAGES
 
   * The 'committer' and 'message' arguments to Repo.do_commit() have 
@@ -40,7 +97,9 @@
 
  API CHANGES
 
-  * Blob.chunked was added. (Jelmer Vernooij)
+  * The primary serialization APIs in dulwich.objects now work 
+    with chunks of strings rather than with full-text strings. 
+    (Jelmer Vernooij)
 
 0.5.0  2010-03-03
 
index 2995f18c650986096b2f40fa0c8f8a6b78467d0a..26067d6cc6a128688bde40e04d5775705043bf5e 100755 (executable)
@@ -1,17 +1,17 @@
 #!/usr/bin/python
-# dul-daemon - Simple git-daemon a like
+# dul-daemon - Simple git-daemon-like server
 # Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
-# 
+#
 # 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; version 2
 # or (at your option) a later version of the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index 0446dd550eddb38878771bf62f9120cfe5bd6a8a..99aa167dc218f2f91ca4283a0284787105cb0d76 100755 (executable)
@@ -1,17 +1,17 @@
 #!/usr/bin/python
 # dul-receive-pack - git-receive-pack in python
 # Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
-# 
+#
 # 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; version 2
 # or (at your option) a later version of the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index 3f9530f9c4f0870461d78227683de23fa852b2cb..d58ce96916613ae1c17c408caef5f8e05fe3b4aa 100755 (executable)
@@ -1,17 +1,17 @@
 #!/usr/bin/python
 # dul-upload-pack - git-upload-pack in python
 # Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
-# 
+#
 # 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; version 2
 # or (at your option) a later version of the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index 5f71953d4a3b6b84e62d0764acc1eddaf07a182e..df2cf8df510801d7579aa832ff2ba4149f5a0ed7 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # dul-web - HTTP-based git server
-# Copyright (C) 2010 David Borowitz <dborowitz@google.com>
+# Copyright (C) 2010 Google, Inc. <dborowitz@google.com>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
index b6f554c4008bf1320475d087ffeea6274a8800e3..8a384db271fb09185dbed71b187a6e4a9a48e56c 100755 (executable)
@@ -1,17 +1,17 @@
 #!/usr/bin/python
 # dulwich - Simple command-line interface to Dulwich
 # Copyright (C) 2008 Jelmer Vernooij <jelmer@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; version 2
 # or (at your option) a later version of the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index c88358fbf035368ff56126070ac738ac02ad6316..1d67763153713754983168b3898eec77b3996da3 100644 (file)
@@ -1,18 +1,18 @@
 # __init__.py -- The git module of dulwich
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
 # Copyright (C) 2008 Jelmer Vernooij <jelmer@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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
@@ -27,4 +27,4 @@ import protocol
 import repo
 import server
 
-__version__ = (0, 5, 1)
+__version__ = (0, 6, 0)
index 5e3e845bec79c18072dbd8586d8622035523c459..7f992b70687a75c578ed3e1b0006601db4605308 100644 (file)
@@ -136,6 +136,14 @@ int cmp_tree_item(const void *_a, const void *_b)
        return strcmp(remain_a, remain_b);
 }
 
+static void free_tree_items(struct tree_item *items, int num) {
+       int i;
+       for (i = 0; i < num; i++) {
+               Py_DECREF(items[i].tuple);
+       }
+       free(items);
+}
+
 static PyObject *py_sorted_tree_items(PyObject *self, PyObject *entries)
 {
        struct tree_item *qsort_entries;
@@ -159,10 +167,16 @@ static PyObject *py_sorted_tree_items(PyObject *self, PyObject *entries)
        i = 0;
        while (PyDict_Next(entries, &pos, &key, &value)) {
                PyObject *py_mode, *py_int_mode, *py_sha;
-               
+
+               if (!PyString_Check(key)) {
+                       PyErr_SetString(PyExc_TypeError, "Name is not a string");
+                       free_tree_items(qsort_entries, i);
+                       return NULL;
+               }
+
                if (PyTuple_Size(value) != 2) {
                        PyErr_SetString(PyExc_ValueError, "Tuple has invalid size");
-                       free(qsort_entries);
+                       free_tree_items(qsort_entries, i);
                        return NULL;
                }
 
@@ -170,19 +184,21 @@ static PyObject *py_sorted_tree_items(PyObject *self, PyObject *entries)
                py_int_mode = PyNumber_Int(py_mode);
                if (!py_int_mode) {
                        PyErr_SetString(PyExc_TypeError, "Mode is not an integral type");
-                       free(qsort_entries);
+                       free_tree_items(qsort_entries, i);
                        return NULL;
                }
 
                py_sha = PyTuple_GET_ITEM(value, 1);
-               if (!PyString_CheckExact(key)) {
-                       PyErr_SetString(PyExc_TypeError, "Name is not a string");
-                       free(qsort_entries);
+               if (!PyString_Check(py_sha)) {
+                       PyErr_SetString(PyExc_TypeError, "SHA is not a string");
+                       Py_DECREF(py_int_mode);
+                       free_tree_items(qsort_entries, i);
                        return NULL;
                }
                qsort_entries[i].name = PyString_AS_STRING(key);
                qsort_entries[i].mode = PyInt_AS_LONG(py_mode);
-               qsort_entries[i].tuple = PyTuple_Pack(3, key, py_mode, py_sha);
+               qsort_entries[i].tuple = PyTuple_Pack(3, key, py_int_mode, py_sha);
+               Py_DECREF(py_int_mode);
                i++;
        }
 
@@ -190,7 +206,7 @@ static PyObject *py_sorted_tree_items(PyObject *self, PyObject *entries)
 
        ret = PyList_New(num);
        if (ret == NULL) {
-               free(qsort_entries);
+               free_tree_items(qsort_entries, i);
                PyErr_NoMemory();
                return NULL;
        }
index a68077a28c60552c66c31f52e7363aa05ef74676..3c4c4074b5b77fbc588d6da9ef87f04ebeec4633 100644 (file)
@@ -161,7 +161,7 @@ class GitClient(object):
                       "%s %s %s\0%s" % (old_sha1, new_sha1, refname,
                                         ' '.join(self._send_capabilities)))
                     sent_capabilities = True
-            if not new_sha1 in (have, ZERO_SHA):
+            if new_sha1 not in have and new_sha1 != ZERO_SHA:
                 want.append(new_sha1)
         self.proto.write_pkt_line(None)
         if not want:
index 88dd768d008ec8492452ec12ab3b4d114a92f5b8..498e29f6fd0134b28d72b5a35683e0b21cdadcd8 100644 (file)
@@ -1,17 +1,17 @@
 # __init__.py -- Fast export/import functionality
 # Copyright (C) 2010 Jelmer Vernooij <jelmer@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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index b6649a8bf9863a85c40df215ac7176af5df5ef94..c80e62d3ca9ec3e8f0ddae54e94b63793f107ae8 100644 (file)
@@ -1,16 +1,16 @@
-# index.py -- File parser/write for the git index file
+# index.py -- File parser/writer for the git index file
 # Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@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; version 2
 # of the License or (at your opinion) any later version of the license.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index 91d9d46b7a33a7add7b57418f540e0ca6c4ced1b..f30bcd6788a8f93f9e6572738434fe82bde61fd4 100644 (file)
@@ -1,3 +1,4 @@
+# lru_cache.py -- Simple LRU cache for dulwich
 # Copyright (C) 2006, 2008 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
index fba21bc6bb22323c3ee87c16cc83970aee9ec651..3a10b255f581ecc06100af58a75c9ea8b8c1926c 100644 (file)
@@ -1,20 +1,21 @@
 # misc.py -- For dealing with python2.4 oddness
 # Copyright (C) 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; version 2
 # of the License or (at your option) a 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., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
+
 """Misc utilities to work with python <2.6.
 
 These utilities can all be deleted when dulwich decides it wants to stop
index d78e6d7e00b0c95491eccc2cb3be42852fb82ed2..9d55c8cf0ca1db7ef9c820c1ec194348bff387e9 100644 (file)
@@ -17,7 +17,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Access to base git objects."""
 
 
@@ -706,10 +705,15 @@ def sorted_tree_items(entries):
     the items would be serialized.
 
     :param entries: Dictionary mapping names to (mode, sha) tuples
-    :return: Iterator over (name, mode, sha)
+    :return: Iterator over (name, mode, hexsha)
     """
     for name, entry in sorted(entries.iteritems(), cmp=cmp_entry):
-        yield name, entry[0], entry[1]
+        mode, hexsha = entry
+        # Stricter type checks than normal to mirror checks in the C version.
+        mode = int(mode)
+        if not isinstance(hexsha, str):
+            raise TypeError('Expected a string for SHA, got %r' % hexsha)
+        yield name, mode, hexsha
 
 
 def cmp_entry((name1, value1), (name2, value2)):
index 43bc24de0c0560f9984ef9a97eb74b5f08e0456d..57cbbe66fa5e2a15c50d9e84db0c2483485e63e2 100644 (file)
@@ -1,6 +1,6 @@
-# pack.py -- For dealing wih packed git objects.
+# pack.py -- For dealing with packed git objects.
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
-# Copryight (C) 2008-2009 Jelmer Vernooij <jelmer@samba.org>
+# Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@samba.org>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -709,9 +709,6 @@ class PackData(object):
     def close(self):
         self._file.close()
 
-    def __del__(self):
-        self.close()
-
     def _get_size(self):
         if self._size is not None:
             return self._size
index 7c20b1e3ff4425af14558bc56fcd3c5c39fade3c..27cd8b82b27a13937f0e6f9c9a4244a63f0d923f 100644 (file)
@@ -1,16 +1,16 @@
-# patch.py -- For dealing wih packed-style patches.
-# Copryight (C) 2009 Jelmer Vernooij <jelmer@samba.org>
-# 
+# patch.py -- For dealing with packed-style patches.
+# Copyright (C) 2009 Jelmer Vernooij <jelmer@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; version 2
 # of the License or (at your option) a 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., 51 Franklin Street, Fifth Floor, Boston,
index 7b339281cbab73e6c210ec4f82151b8e439c35c0..8bd7842d854e97597761c04222998d879a84d0ee 100644 (file)
@@ -1,5 +1,5 @@
 # protocol.py -- Shared parts of the git protocols
-# Copryight (C) 2008 John Carr <john.carr@unrouted.co.uk>
+# Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
 # Copyright (C) 2008 Jelmer Vernooij <jelmer@samba.org>
 #
 # This program is free software; you can redistribute it and/or
index 6cf5df1940a793f46115c29e3560df43efaf28e5..7d80fc114d0d9fa35bec072e8167804dd202fa18 100644 (file)
@@ -1,18 +1,18 @@
-# repo.py -- For dealing wih git repositories.
+# repo.py -- For dealing with git repositories.
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
 # Copyright (C) 2008-2009 Jelmer Vernooij <jelmer@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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
@@ -219,7 +219,7 @@ class RefsContainer(object):
         """Read a reference without following any references.
 
         :param refname: The name of the reference
-        :return: The contents of the ref file, or None if it does 
+        :return: The contents of the ref file, or None if it does
             not exist.
         """
         contents = self.read_loose_ref(refname)
@@ -231,7 +231,7 @@ class RefsContainer(object):
         """Read a loose reference and return its contents.
 
         :param name: the refname to read
-        :return: The contents of the ref file, or None if it does 
+        :return: The contents of the ref file, or None if it does
             not exist.
         """
         raise NotImplementedError(self.read_loose_ref)
@@ -433,7 +433,10 @@ class DiskRefsContainer(RefsContainer):
         """
         # TODO: invalidate the cache on repacking
         if self._packed_refs is None:
+            # set both to empty because we want _peeled_refs to be
+            # None if and only if _packed_refs is also None.
             self._packed_refs = {}
+            self._peeled_refs = {}
             path = os.path.join(self.path, 'packed-refs')
             try:
                 f = GitFile(path, 'rb')
@@ -445,7 +448,6 @@ class DiskRefsContainer(RefsContainer):
                 first_line = iter(f).next().rstrip()
                 if (first_line.startswith("# pack-refs") and " peeled" in
                         first_line):
-                    self._peeled_refs = {}
                     for sha, name, peeled in read_packed_refs_with_peeled(f):
                         self._packed_refs[name] = sha
                         if peeled:
@@ -762,7 +764,7 @@ class BaseRepo(object):
 
     def open_index(self):
         """Open the index for this repository.
-        
+
         :raises NoIndexPresent: If no index is present
         :return: Index instance
         """
@@ -772,7 +774,7 @@ class BaseRepo(object):
         """Fetch objects into another repository.
 
         :param target: The target repository
-        :param determine_wants: Optional function to determine what refs to 
+        :param determine_wants: Optional function to determine what refs to
             fetch.
         :param progress: Optional progress function
         """
@@ -787,12 +789,12 @@ class BaseRepo(object):
                       get_tagged=None):
         """Fetch the missing objects required for a set of revisions.
 
-        :param determine_wants: Function that takes a dictionary with heads 
+        :param determine_wants: Function that takes a dictionary with heads
             and returns the list of heads to fetch.
-        :param graph_walker: Object that can iterate over the list of revisions 
-            to fetch and has an "ack" method that will be called to acknowledge 
+        :param graph_walker: Object that can iterate over the list of revisions
+            to fetch and has an "ack" method that will be called to acknowledge
             that a revision is present.
-        :param progress: Simple progress function that will be called with 
+        :param progress: Simple progress function that will be called with
             updated progress strings.
         :param get_tagged: Function that returns a dict of pointed-to sha -> tag
             sha for including tags.
@@ -984,9 +986,9 @@ class BaseRepo(object):
             del self.refs[name]
         raise ValueError(name)
 
-    def do_commit(self, message, committer=None, 
+    def do_commit(self, message, committer=None,
                   author=None, commit_timestamp=None,
-                  commit_timezone=None, author_timestamp=None, 
+                  commit_timezone=None, author_timestamp=None,
                   author_timezone=None, tree=None):
         """Create a new commit.
 
@@ -996,7 +998,7 @@ class BaseRepo(object):
         :param commit_timestamp: Commit timestamp (defaults to now)
         :param commit_timezone: Commit timestamp timezone (defaults to GMT)
         :param author_timestamp: Author timestamp (defaults to commit timestamp)
-        :param author_timezone: Author timestamp timezone 
+        :param author_timezone: Author timestamp timezone
             (defaults to commit timestamp timezone)
         :param tree: SHA1 of the tree root to use (if not specified the current index will be committed).
         :return: New commit SHA1
index 24dd90693d7abd5acf6477b1549ad4fd3dde93f6..171eb41c475ba9bbe58836460b54e1222d24ab17 100644 (file)
@@ -1,5 +1,5 @@
 # server.py -- Implementation of the server side git protocols
-# Copryight (C) 2008 John Carr <john.carr@unrouted.co.uk>
+# Copyright (C) 2008 John Carr <john.carr@unrouted.co.uk>
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
index 3a812b9cf56f2e4cf3c6133e98820fd61250bae6..42a0e73d9dbaa4e31b86b03c60f11132e03346f9 100644 (file)
@@ -1,17 +1,17 @@
 # __init__.py -- The tests for dulwich
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
-# 
+#
 # 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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index a3016b4d6ae8fe547eb0b497709eb7a838740cc8..c15dfa99643fabb6fe261f3643e040285be0cbb6 100644 (file)
@@ -75,7 +75,12 @@ class DulwichClientTest(CompatTestCase):
             pass
         shutil.rmtree(self.gitroot)
 
-    def test_send_pack(self):
+    def assertDestEqualsSrc(self):
+        src = repo.Repo(os.path.join(self.gitroot, 'server_new.export'))
+        dest = repo.Repo(os.path.join(self.gitroot, 'dest'))
+        self.assertReposEqual(src, dest)
+
+    def _do_send_pack(self):
         c = client.TCPGitClient('localhost')
         srcpath = os.path.join(self.gitroot, 'server_new.export')
         src = repo.Repo(srcpath)
@@ -83,8 +88,16 @@ class DulwichClientTest(CompatTestCase):
         del sendrefs['HEAD']
         c.send_pack('/dest', lambda _: sendrefs,
                     src.object_store.generate_pack_contents)
-        dest = repo.Repo(os.path.join(self.gitroot, 'dest'))
-        self.assertReposEqual(src, dest)
+
+    def test_send_pack(self):
+        self._do_send_pack()
+        self.assertDestEqualsSrc()
+
+    def test_send_pack_nothing_to_send(self):
+        self._do_send_pack()
+        self.assertDestEqualsSrc()
+        # nothing to send, but shouldn't raise either.
+        self._do_send_pack()
 
     def test_send_without_report_status(self):
         c = client.TCPGitClient('localhost')
@@ -95,8 +108,7 @@ class DulwichClientTest(CompatTestCase):
         del sendrefs['HEAD']
         c.send_pack('/dest', lambda _: sendrefs,
                     src.object_store.generate_pack_contents)
-        dest = repo.Repo(os.path.join(self.gitroot, 'dest'))
-        self.assertReposEqual(src, dest)
+        self.assertDestEqualsSrc()
 
     def disable_ff_and_make_dummy_commit(self):
         # disable non-fast-forward pushes to the server
@@ -148,3 +160,20 @@ class DulwichClientTest(CompatTestCase):
             self.assertEqual({'refs/heads/branch': 'non-fast-forward',
                               'refs/heads/master': 'non-fast-forward'},
                              e.ref_status)
+
+    def test_fetch_pack(self):
+        c = client.TCPGitClient('localhost')
+        dest = repo.Repo(os.path.join(self.gitroot, 'dest'))
+        refs = c.fetch('/server_new.export', dest)
+        map(lambda r: dest.refs.set_if_equals(r[0], None, r[1]), refs.items())
+        self.assertDestEqualsSrc()
+
+    def test_incremental_fetch_pack(self):
+        self.test_fetch_pack()
+        dest, dummy = self.disable_ff_and_make_dummy_commit()
+        dest.refs['refs/heads/master'] = dummy
+        c = client.TCPGitClient('localhost')
+        dest = repo.Repo(os.path.join(self.gitroot, 'server_new.export'))
+        refs = c.fetch('/dest', dest)
+        map(lambda r: dest.refs.set_if_equals(r[0], None, r[1]), refs.items())
+        self.assertDestEqualsSrc()
index 3b8a27d03d40915ddddeba8604814c86673c97d4..ba6e2b56def64c2382b033088bcdc2db43b109b6 100644 (file)
@@ -1,4 +1,4 @@
-# test_pack.py -- Compatibilty tests for git packs.
+# test_pack.py -- Compatibility tests for git packs.
 # Copyright (C) 2010 Google, Inc.
 #
 # This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-"""Compatibilty tests for git packs."""
+"""Compatibility tests for git packs."""
 
 
 import binascii
index 1a5094ab090677344ac41101cbd05fc21abe6c30..0387545d3fbb4cb17ec94b804c6a2d04555913ce 100644 (file)
@@ -1,4 +1,4 @@
-# test_server.py -- Compatibilty tests for git server.
+# test_server.py -- Compatibility tests for git server.
 # Copyright (C) 2010 Google, Inc.
 #
 # This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-"""Compatibilty tests between Dulwich and the cgit server.
+"""Compatibility tests between Dulwich and the cgit server.
 
 Warning: these tests should be fairly stable, but when writing/debugging new
 tests, deadlocks may freeze the test process such that it cannot be Ctrl-C'ed.
index 4fd03d61caae8b597d3fdab7e634095df91c1683..d47b7181584b6b7683afc70be2ddc6a00c4d2d46 100644 (file)
@@ -1,4 +1,4 @@
-# test_web.py -- Compatibilty tests for the git web server.
+# test_web.py -- Compatibility tests for the git web server.
 # Copyright (C) 2010 Google, Inc.
 #
 # This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-"""Compatibilty tests between Dulwich and the cgit HTTP server.
+"""Compatibility tests between Dulwich and the cgit HTTP server.
 
 Warning: these tests should be fairly stable, but when writing/debugging new
 tests, deadlocks may freeze the test process such that it cannot be Ctrl-C'ed.
index a38c3a7b59c2a1fc8db9f8a8e2315c9167ba1e2f..485b1cae1da568ec2a6c814fd3999e9f2c89abeb 100644 (file)
@@ -1,17 +1,17 @@
 # test_fastexport.py -- Fast export/import functionality
 # Copyright (C) 2010 Jelmer Vernooij <jelmer@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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
index 4dcbf05b98801839f6f992535ae0fe2c661b611a..7e9cc6d71c0901d74f39600ce7370c5e248252e5 100644 (file)
@@ -16,7 +16,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 import errno
 import os
 import shutil
index f23079837b1a5ce7f04961cea98b5e6b2797e9e7..8f04494b6bb1e10f515caf8a705733c6ebe7fee4 100644 (file)
@@ -16,7 +16,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for the index."""
 
 
index f98d07eaaa24fdd30cc88c25a6c6c48aba75affa..814f8030f87d639cb16a30a87ee77e85dc030c34 100644 (file)
@@ -16,7 +16,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for the object store interface."""
 
 
index 3a00d4345f1358cd9ba37762c2fd8c762b70b2b4..697e3d9fb3b3fab4c5116206c5ca7e4fa55a18f8 100644 (file)
@@ -1,23 +1,22 @@
 # test_objects.py -- tests for objects.py
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
-# 
+#
 # 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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for git base objects."""
 
 # TODO: Round-trip parse-serialize-parse and serialize-parse-serialize tests.
@@ -46,6 +45,8 @@ from dulwich.objects import (
     parse_timezone,
     parse_tree,
     _parse_tree_py,
+    sorted_tree_items,
+    _sorted_tree_items_py,
     )
 from dulwich.tests import (
     TestSkipped,
@@ -404,6 +405,19 @@ class CommitParseTests(ShaFileCheckTests):
                 self.assertCheckFails(Commit, text)
 
 
+_TREE_ITEMS = {
+  'a.c': (0100755, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  'a': (stat.S_IFDIR, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  'a/c': (stat.S_IFDIR, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  }
+
+_SORTED_TREE_ITEMS = [
+  ('a.c', 0100755, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  ('a', stat.S_IFDIR, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  ('a/c', stat.S_IFDIR, 'd80c186a03f423a81b39df39dc87fd269736ca86'),
+  ]
+
+
 class TreeTests(ShaFileCheckTests):
 
     def test_simple(self):
@@ -422,10 +436,9 @@ class TreeTests(ShaFileCheckTests):
 
     def test_tree_dir_sort(self):
         x = Tree()
-        x["a.c"] = (0100755, "d80c186a03f423a81b39df39dc87fd269736ca86")
-        x["a"] = (stat.S_IFDIR, "d80c186a03f423a81b39df39dc87fd269736ca86")
-        x["a/c"] = (stat.S_IFDIR, "d80c186a03f423a81b39df39dc87fd269736ca86")
-        self.assertEquals(["a.c", "a", "a/c"], [p[0] for p in x.iteritems()])
+        for name, item in _TREE_ITEMS.iteritems():
+            x[name] = item
+        self.assertEquals(_SORTED_TREE_ITEMS, list(x.iteritems()))
 
     def _do_test_parse_tree(self, parse_tree):
         dir = os.path.join(os.path.dirname(__file__), 'data', 'trees')
@@ -441,6 +454,32 @@ class TreeTests(ShaFileCheckTests):
             raise TestSkipped('parse_tree extension not found')
         self._do_test_parse_tree(parse_tree)
 
+    def _do_test_sorted_tree_items(self, sorted_tree_items):
+        def do_sort(entries):
+            return list(sorted_tree_items(entries))
+
+        self.assertEqual(_SORTED_TREE_ITEMS, do_sort(_TREE_ITEMS))
+
+        # C/Python implementations may differ in specific error types, but
+        # should all error on invalid inputs.
+        # For example, the C implementation has stricter type checks, so may
+        # raise TypeError where the Python implementation raises AttributeError.
+        errors = (TypeError, ValueError, AttributeError)
+        self.assertRaises(errors, do_sort, 'foo')
+        self.assertRaises(errors, do_sort, {'foo': (1, 2, 3)})
+
+        myhexsha = 'd80c186a03f423a81b39df39dc87fd269736ca86'
+        self.assertRaises(errors, do_sort, {'foo': ('xxx', myhexsha)})
+        self.assertRaises(errors, do_sort, {'foo': (0100755, 12345)})
+
+    def test_sorted_tree_items(self):
+        self._do_test_sorted_tree_items(_sorted_tree_items_py)
+
+    def test_sorted_tree_items_extension(self):
+        if sorted_tree_items is _sorted_tree_items_py:
+            raise TestSkipped('sorted_tree_items extension not found')
+        self._do_test_sorted_tree_items(sorted_tree_items)
+
     def test_check(self):
         t = Tree
         sha = hex_to_sha(a_sha)
index 9dbc43f4df3066398638711487483e624c8c98fd..9522cbb5f71061b3ca11932e8246e7cae5f17146 100644 (file)
@@ -17,7 +17,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for Dulwich packs."""
 
 
index 12ed85b8d445f9fe152d62ac2ab515697310b172..dc62925c279cc3fb29950a3c4bfcc1aa252c8a59 100644 (file)
@@ -1,16 +1,16 @@
 # test_patch.py -- tests for patch.py
-# Copryight (C) 2010 Jelmer Vernooij <jelmer@samba.org>
-# 
+# Copyright (C) 2010 Jelmer Vernooij <jelmer@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; version 2
 # of the License or (at your option) a 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., 51 Franklin Street, Fifth Floor, Boston,
index 7039456d88db00f356a843aac28b3d403c5a4bef..a182b35df3e848b4482b01e42819914cb5d68ae7 100644 (file)
@@ -1,22 +1,21 @@
 # test_protocol.py -- Tests for the git protocol
 # Copyright (C) 2009 Jelmer Vernooij <jelmer@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; version 2
 # or (at your option) any later version of the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for the smart protocol utility functions."""
 
 
index 9918e024ec612097c21133673a04bb04dbea2caa..ee7d861754d77af0b37a68911ed523046a678df2 100644 (file)
@@ -1,23 +1,22 @@
 # test_repository.py -- tests for repository.py
 # Copyright (C) 2007 James Westby <jw+debian@jameswestby.net>
-# 
+#
 # 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; version 2
-# of the License or (at your option) any later version of 
+# of the License or (at your option) any later version of
 # the License.
-# 
+#
 # 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., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for the repository."""
 
 from cStringIO import StringIO
@@ -68,11 +67,11 @@ class RepositoryTests(unittest.TestCase):
     def tearDown(self):
         if self._repo is not None:
             tear_down_repo(self._repo)
-  
+
     def test_simple_props(self):
         r = self._repo = open_repo('a.git')
         self.assertEqual(r.controldir(), r.path)
-  
+
     def test_ref(self):
         r = self._repo = open_repo('a.git')
         self.assertEqual(r.ref('refs/heads/master'),
@@ -83,7 +82,7 @@ class RepositoryTests(unittest.TestCase):
         r["refs/tags/foo"] = 'a90fa2d900a17e99b433217e988c4eb4a2e9a097'
         self.assertEquals('a90fa2d900a17e99b433217e988c4eb4a2e9a097',
                           r["refs/tags/foo"].id)
-  
+
     def test_get_refs(self):
         r = self._repo = open_repo('a.git')
         self.assertEqual({
@@ -92,7 +91,7 @@ class RepositoryTests(unittest.TestCase):
             'refs/tags/mytag': '28237f4dc30d0d462658d6b937b08a0f0b6ef55a',
             'refs/tags/mytag-packed': 'b0931cadc54336e78a1d980420e3268903b57a50',
             }, r.get_refs())
-  
+
     def test_head(self):
         r = self._repo = open_repo('a.git')
         self.assertEqual(r.head(), 'a90fa2d900a17e99b433217e988c4eb4a2e9a097')
@@ -216,14 +215,14 @@ class RepositoryTests(unittest.TestCase):
             self.assertRaises(errors.NotBlobError, r.get_blob, r.head())
         finally:
             warnings.resetwarnings()
-    
+
     def test_linear_history(self):
         r = self._repo = open_repo('a.git')
         history = r.revision_history(r.head())
         shas = [c.sha().hexdigest() for c in history]
         self.assertEqual(shas, [r.head(),
                                 '2a72d929692c41d8554c07f6301757ba18a65d91'])
-  
+
     def test_merge_history(self):
         r = self._repo = open_repo('simple_merge.git')
         history = r.revision_history(r.head())
@@ -233,12 +232,12 @@ class RepositoryTests(unittest.TestCase):
                                 '4cffe90e0a41ad3f5190079d7c8f036bde29cbe6',
                                 '60dacdc733de308bb77bb76ce0fb0f9b44c9769e',
                                 '0d89f20333fbb1d2f3a94da77f4981373d8f4310'])
-  
+
     def test_revision_history_missing_commit(self):
         r = self._repo = open_repo('simple_merge.git')
         self.assertRaises(errors.MissingCommitError, r.revision_history,
                           missing_sha)
-  
+
     def test_out_of_order_merge(self):
         """Test that revision history is ordered by date, not parent order."""
         r = self._repo = open_repo('ooo_merge.git')
@@ -248,7 +247,7 @@ class RepositoryTests(unittest.TestCase):
                                 'f507291b64138b875c28e03469025b1ea20bc614',
                                 'fb5b0425c7ce46959bec94d54b9a157645e114f5',
                                 'f9e39b120c68182a4ba35349f832d0e4e61f485c'])
-  
+
     def test_get_tags_empty(self):
         r = self._repo = open_repo('ooo_merge.git')
         self.assertEqual({}, r.refs.as_dict('refs/tags'))
@@ -735,6 +734,19 @@ class DiskRefsContainerTests(RefsContainerTests, unittest.TestCase):
         self.assertFalse(os.path.exists(
             os.path.join(self._refs.path, 'HEAD.lock')))
 
+    def test_remove_packed_without_peeled(self):
+        refs_file = os.path.join(self._repo.path, 'packed-refs')
+        f = open(refs_file)
+        refs_data = f.read()
+        f.close()
+        f = open(refs_file, 'w')
+        f.write('\n'.join(l for l in refs_data.split('\n')
+                          if not l or l[0] not in '#^'))
+        f.close()
+        self._repo = Repo(self._repo.path)
+        refs = self._repo.refs
+        self.assertTrue(refs.remove_if_equals(
+          'refs/heads/packed', '42d06bd4b77fed026b154d16493e5deab78f02ec'))
 
     def test_remove_if_equals_packed(self):
         # test removing ref that is only packed
@@ -747,7 +759,7 @@ class DiskRefsContainerTests(RefsContainerTests, unittest.TestCase):
 
     def test_read_ref(self):
         self.assertEqual('ref: refs/heads/master', self._refs.read_ref("HEAD"))
-        self.assertEqual('42d06bd4b77fed026b154d16493e5deab78f02ec', 
+        self.assertEqual('42d06bd4b77fed026b154d16493e5deab78f02ec',
             self._refs.read_ref("refs/heads/packed"))
         self.assertEqual(None,
             self._refs.read_ref("nonexistant"))
index 7822bee24eca32afb7e74d8b13c95a010d1ae558..2e668fc232b05dc8fbf894bbef47ff4b5a84c3c2 100644 (file)
@@ -16,7 +16,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
 
-
 """Tests for the smart protocol server."""
 
 
index 66c042274d51658c89068b12c1c536e7db111b03..2eb02226199c012c9da2f14af06028cbbe88b317 100644 (file)
@@ -1,5 +1,5 @@
 # test_web.py -- Tests for the git HTTP server
-# Copryight (C) 2010 Google, Inc.
+# Copyright (C) 2010 Google, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
index 8e154538b11aa3435f30f2ffa851250d5935ecb5..380d5073c4068e1df935f67c9dac97bef3dc53a1 100644 (file)
@@ -1,5 +1,5 @@
 # web.py -- WSGI smart-http server
-# Copryight (C) 2010 Google, Inc.
+# Copyright (C) 2010 Google, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
index a6b32b41f77818189c7d0e39d8dc4ab58dddfff5..473480a66a041896a53cd7702015be83b796649a 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# Setup file for bzr-git
+# Setup file for dulwich
 # Copyright (C) 2008-2010 Jelmer Vernooij <jelmer@samba.org>
 
 try:
@@ -8,7 +8,7 @@ except ImportError:
     from distutils.core import setup, Extension
 from distutils.core import Distribution
 
-dulwich_version_string = '0.5.1'
+dulwich_version_string = '0.6.0'
 
 include_dirs = []
 # Windows MSVC support