Improve ref handling.
authorDave Borowitz <dborowitz@google.com>
Thu, 28 Jan 2010 20:42:16 +0000 (12:42 -0800)
committerDave Borowitz <dborowitz@google.com>
Tue, 9 Feb 2010 17:51:20 +0000 (09:51 -0800)
commita93f44f5cfcf209a1eb323c776f3570d09fc6ccf
treea3ad693b9bbe2afbb3ece8afbc5d98ea86d4544c
parentffa29618c8a301a40938a54a54d750e9710f640c
Improve ref handling.

DiskRefsConatiner now handles packed-refs transparently, and
understands both the peeled and unpeeled packed-refs formats
correctly. Ref cycles are handled by giving up after reaching an
arbitrary recurion depth.

Includes tests for all new functionality.

Change-Id: I742117d7a2b99cbb52ee2a9d3a625037844c55b6
13 files changed:
dulwich/errors.py
dulwich/file.py
dulwich/repo.py
dulwich/tests/data/repos/refs.git/HEAD [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/objects/3b/9e5457140e738c2dcd39bf6d7acf88379b90d1 [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/objects/42/d06bd4b77fed026b154d16493e5deab78f02ec [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/objects/a1/8114c31713746a33a2e70d9914d1ef3e781425 [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/objects/df/6800012397fb85c56e7418dd4eb9405dee075c [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/packed-refs [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/refs/heads/loop [new file with mode: 0644]
dulwich/tests/data/repos/refs.git/refs/heads/master [new file with mode: 0644]
dulwich/tests/test_file.py
dulwich/tests/test_repository.py