[Pkg-bazaar-commits] ./bzr-git/unstable r22: New snapshot.

Jelmer Vernooij jelmer at samba.org
Thu Jul 3 17:24:49 UTC 2008


------------------------------------------------------------
revno: 22
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: debian
timestamp: Thu 2008-07-03 19:24:49 +0200
message:
  New snapshot.
removed:
  INSTALL
added:
  setup.py
modified:
  .bzrignore
  debian/changelog
  git_repository.py
  tests/test_git_repository.py
  tests/test_ids.py
    ------------------------------------------------------------
    revno: 17.1.33
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Wed 2008-01-09 02:56:28 +0100
    message:
      add setup.py
    added:
      setup.py
    ------------------------------------------------------------
    revno: 17.1.34
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: ddaa
    timestamp: Thu 2008-07-03 19:07:38 +0200
    message:
      Fix copyright.
    modified:
      tests/test_ids.py
    ------------------------------------------------------------
    revno: 17.1.35
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Thu 2008-07-03 19:09:00 +0200
    message:
      Merge James.
    modified:
      git_repository.py
      tests/test_git_repository.py
      tests/test_ids.py
        ------------------------------------------------------------
        revno: 17.4.1
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: git
        timestamp: Thu 2008-03-13 18:14:09 +0000
        message:
          Fix id tests to match new revid prefix.
        modified:
          tests/test_ids.py
        ------------------------------------------------------------
        revno: 17.4.2
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: git
        timestamp: Thu 2008-03-13 18:20:03 +0000
        message:
          Switch to TestCaseWithTransport so that the cache dir can be
          created.
        modified:
          tests/test_git_repository.py
        ------------------------------------------------------------
        revno: 17.4.3
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: git
        timestamp: Thu 2008-03-13 18:27:39 +0000
        message:
          More corrections for revision id change.
        modified:
          tests/test_git_repository.py
        ------------------------------------------------------------
        revno: 17.4.4
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: git
        timestamp: Thu 2008-03-13 18:37:47 +0000
        message:
          Make the inventory test match what the code produces.
        modified:
          tests/test_git_repository.py
        ------------------------------------------------------------
        revno: 17.4.5
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: git
        timestamp: Thu 2008-03-13 18:38:34 +0000
        message:
          Lose the debuggin prints.
        modified:
          git_repository.py
    ------------------------------------------------------------
    revno: 17.1.36
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Thu 2008-07-03 19:13:42 +0200
    message:
      Ignore build directory.
    modified:
      .bzrignore
    ------------------------------------------------------------
    revno: 17.1.37
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Thu 2008-07-03 19:14:04 +0200
    message:
      Remove obsolete installation instructions.
    removed:
      INSTALL
-------------- next part --------------
=== modified file '.bzrignore'
--- a/.bzrignore	2007-12-27 17:04:41 +0000
+++ b/.bzrignore	2008-07-03 17:13:42 +0000
@@ -2,3 +2,4 @@
 *~
 ./.project
 ./.pydevproject
+build

=== removed file 'INSTALL'
--- a/INSTALL	2007-08-04 12:36:32 +0000
+++ b/INSTALL	1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-Installation
-============
-
-Installation of bzr-git requires several things:
-
-1) bzr 0.9 or higher
-2) symlink the directory containing __init__.py from bzr-git - i.e. this source
-   tree - into either ~/.bazaar/plugins/git, or wherever bzrlib is as
-   bzrlib/plugins/git.
-3) stgit should be installed, or otherwise make 'stgit' be available to python.
-   You can test this via 'python -c "import stgit"'. If that generates any
-   error, then stgit is not correctly installed. stgit is used to provide 
-   python parsing of the output of git commands.

=== modified file 'debian/changelog'
--- a/debian/changelog	2008-01-09 01:56:47 +0000
+++ b/debian/changelog	2008-07-03 17:24:49 +0000
@@ -1,4 +1,4 @@
-bzr-git (0.1~bzr50-1) unstable; urgency=low
+bzr-git (0.1~bzr54-1) unstable; urgency=low
 
   * Initial release.
 

=== modified file 'git_repository.py'
--- a/git_repository.py	2007-12-30 06:58:28 +0000
+++ b/git_repository.py	2008-03-13 18:38:34 +0000
@@ -148,7 +148,7 @@
             return self._revision_cache[revision_id]
         git_commit_id = ids.convert_revision_id_bzr_to_git(revision_id)
         raw = self._git.rev_list([git_commit_id], max_count=1, header=True)
-        print "fetched revision:", git_commit_id
+        # print "fetched revision:", git_commit_id
         revision = self._parse_rev(raw)
         self._revision_cache[revision_id] = revision
         return revision
@@ -255,7 +255,7 @@
 
     def _fetch_blob(self, git_id):
         lines = self._git.cat_file('blob', git_id)
-        print "fetched blob:", git_id
+        # print "fetched blob:", git_id
         if self._building_inventory is not None:
             self._building_inventory.git_file_data[git_id] = lines
         return lines
@@ -372,7 +372,7 @@
             max_count=1, topo_order=True, paths=[path])
         [line] = lines
         result = ids.convert_revision_id_git_to_bzr(line[:-1])
-        print "fetched file revision", line[:-1], path
+        # print "fetched file revision", line[:-1], path
         return result
 
     def _get_entry_revision_from_db(self, revid, path, git_id, executable):

=== added file 'setup.py'
--- a/setup.py	1970-01-01 00:00:00 +0000
+++ b/setup.py	2008-01-09 01:56:28 +0000
@@ -0,0 +1,19 @@
+#!/usr/bin/env python2.4
+
+from distutils.core import setup
+
+setup(name='bzr-git',
+      description='Support for Git branches in Bazaar',
+      keywords='plugin bzr git bazaar',
+      version='0.1',
+      url='http://bazaar-vcs.org/BzrForeignBranches/Git',
+      license='GPL',
+      author='Robert Collins',
+      author_email='robertc at robertcollins.net',
+      long_description="""
+      This plugin adds limited support for checking out and viewing 
+      Git branches in Bazaar.
+      """,
+      package_dir={'bzrlib.plugins.git':'.'},
+      packages=['bzrlib.plugins.git']
+      )

=== modified file 'tests/test_git_repository.py'
--- a/tests/test_git_repository.py	2007-12-30 01:11:44 +0000
+++ b/tests/test_git_repository.py	2008-03-13 18:37:47 +0000
@@ -115,7 +115,8 @@
         builder.set_file('executable', 'content', True)
         builder.set_link('link', 'broken')
         builder.set_file('subdir/subfile', 'subdir text\n', False)
-        commit_handle = builder.commit('Joe Foo <joe at foo.com>', u'message')
+        commit_handle = builder.commit('Joe Foo <joe at foo.com>', u'message',
+            timestamp=1205433193)
         mapping = builder.finish()
         commit_id = mapping[commit_handle]
 
@@ -124,27 +125,26 @@
         repo = repository.Repository.open('.')
         inv = repo.get_inventory(revid)
         self.assertIsInstance(inv, inventory.Inventory)
-        entries = list(inv.iter_entries())
         printed_inv = '\n'.join(
             repr((path, entry.executable, entry))
             for path, entry in inv.iter_entries())
         self.assertEqualDiff(
             printed_inv,
             "('', False, InventoryDirectory('TREE_ROOT', u'', parent_id=None,"
-            " revision=None))\n"
+            " revision='git-experimental-r:69c39cfa65962f3cf16b9b3eb08a15954e9d8590'))\n"
             "(u'data', False, InventoryFile('data', u'data',"
             " parent_id='TREE_ROOT',"
-            " sha1='8e27be7d6154a1f68ea9160ef0e18691d20560dc', len=None))\n"
+            " sha1='aa785adca3fcdfe1884ae840e13c6d294a2414e8', len=5))\n"
             "(u'executable', True, InventoryFile('executable', u'executable',"
             " parent_id='TREE_ROOT',"
-            " sha1='6b584e8ece562ebffc15d38808cd6b98fc3d97ea', len=None))\n"
+            " sha1='040f06fd774092478d450774f5ba30c5da78acc8', len=7))\n"
             "(u'link', False, InventoryLink('link', u'link',"
-            " parent_id='TREE_ROOT', revision=None))\n"
+            " parent_id='TREE_ROOT', revision='git-experimental-r:69c39cfa65962f3cf16b9b3eb08a15954e9d8590'))\n"
             "(u'subdir', False, InventoryDirectory('subdir', u'subdir',"
-            " parent_id='TREE_ROOT', revision=None))\n"
+            " parent_id='TREE_ROOT', revision='git-experimental-r:69c39cfa65962f3cf16b9b3eb08a15954e9d8590'))\n"
             "(u'subdir/subfile', False, InventoryFile('subdir/subfile',"
             " u'subfile', parent_id='subdir',"
-            " sha1='0ddb53cbe2dd209f550dd8d7f1287a5ed9b1ee8b', len=None))")
+            " sha1='67b75c3e49f31fcadddbf9df6a1d8be8c3e44290', len=12))")
 
 
 class MemoryGitRepository(git_repository.GitRepository):
@@ -167,10 +167,10 @@
     _gitdir_class = MemoryGitDir
 
 
-class TestGitRepository(tests.TestCaseWithMemoryTransport):
+class TestGitRepository(tests.TestCaseWithTransport):
 
     def setUp(self):
-        tests.TestCaseWithMemoryTransport.setUp(self)
+        tests.TestCaseWithTransport.setUp(self)
         self.transport = self.get_transport()
         self.transport.mkdir('.git')
         self.git_dir = MemoryGitBzrDirFormat().open(self.transport)
@@ -213,8 +213,8 @@
             "\n",
             "    message\n",
             "\x00"])
-        self.assertEqual(
-            rev.revision_id, 'git1r-873a8ae0d682b0e63e9795bc53056d32ed3de93f')
+        self.assertEqual(rev.revision_id,
+            'git-experimental-r:873a8ae0d682b0e63e9795bc53056d32ed3de93f')
         self.assertEqual(rev.parent_ids, [])
         self.assertEqual(rev.committer, 'Joe Foo <joe at foo.com>')
         self.assertEqual(repr(rev.timestamp), '1198784532.0')
@@ -244,9 +244,9 @@
         # commit base, the following parents are the ordered merged revisions.
         self.assertEqual(
             rev.parent_ids,
-            ['git1r-263ed20f0d4898be994404ca418bafe8e89abb8a',
-             'git1r-546563eb8f3e94a557f3bb779b6e5a2bd9658752',
-             'git1r-3116d42db7b5c5e69e58f651721e179791479c23'])
+            ['git-experimental-r:263ed20f0d4898be994404ca418bafe8e89abb8a',
+             'git-experimental-r:546563eb8f3e94a557f3bb779b6e5a2bd9658752',
+             'git-experimental-r:3116d42db7b5c5e69e58f651721e179791479c23'])
 
     def test_redundant_spaces(self):
         # Redundant spaces in author and committer are preserved.

=== modified file 'tests/test_ids.py'
--- a/tests/test_ids.py	2007-12-26 20:13:49 +0000
+++ b/tests/test_ids.py	2008-07-03 17:09:00 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Canonical Ltd
+# Copyright (C) 2007 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
@@ -21,11 +21,13 @@
 class TestRevidConversion(tests.TestCase):
 
     def test_simple_git_to_bzr_revision_id(self):
-        self.assertEqual("git1r-c6a4d8f1fa4ac650748e647c4b1b368f589a7356",
+        self.assertEqual("git-experimental-r:"
+                         "c6a4d8f1fa4ac650748e647c4b1b368f589a7356",
                          ids.convert_revision_id_git_to_bzr(
                             "c6a4d8f1fa4ac650748e647c4b1b368f589a7356"))
 
     def test_simple_bzr_to_git_revision_id(self):
         self.assertEqual("c6a4d8f1fa4ac650748e647c4b1b368f589a7356",
                          ids.convert_revision_id_bzr_to_git(
-                            "git1r-c6a4d8f1fa4ac650748e647c4b1b368f589a7356"))
+                            "git-experimental-r:"
+                            "c6a4d8f1fa4ac650748e647c4b1b368f589a7356"))



More information about the Pkg-bazaar-commits mailing list