git: test failures: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.

Bug #1270075 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Undecided
Jelmer Vernooij
Breezy
Fix Released
Medium
Jelmer Vernooij
bzr-git (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Running the tests of 0.6.12-2 (current trusty package) on current trusty gives three failures:

======================================================================
FAIL: bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch_ls
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: log: {{{
0.200 creating repository in file:///tmp/testbzr-8y2WEH.tmp/.bzr/.
0.203 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x2b3a250> in file:///tmp/testbzr-8y2WEH.tmp/
0.211 trying to create missing lock '/tmp/testbzr-8y2WEH.tmp/.bzr/checkout/dirstate'
0.212 opening working tree '/tmp/testbzr-8y2WEH.tmp'
0.228 run bzr: ['ls', '-r-1']
0.228 bazaar version: 2.6.0
0.228 bzr arguments: [u'ls', u'-r-1']
0.231 encoding stdout as sys.stdout encoding 'utf-8'
0.239 output:
'a\n'
0.239 errors:
'/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.\n return self.repository._git.ref(self.ref or "HEAD")\n'
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/tests/test_blackbox.py", line 96, in test_branch_ls
    self.assertEqual(error, '')
  File "/usr/lib/python2.7/dist-packages/bzrlib/tests/__init__.py", line 1360, in assertEqual
    pprint.pformat(a), pprint.pformat(b)))
AssertionError: not equal:
a = '/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.\n return self.repository._git.ref(self.ref or "HEAD")\n'
b = ''

======================================================================
FAIL: bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: log: {{{
0.197 creating repository in file:///tmp/testbzr-454ljz.tmp/.bzr/.
0.200 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x2b3a250> in file:///tmp/testbzr-454ljz.tmp/
0.209 trying to create missing lock '/tmp/testbzr-454ljz.tmp/.bzr/checkout/dirstate'
0.210 opening working tree '/tmp/testbzr-454ljz.tmp'
0.228 run bzr: ['branch', 'gitbranch', 'bzrbranch']
0.228 bazaar version: 2.6.0
0.228 bzr arguments: [u'branch', u'gitbranch', u'bzrbranch']
0.231 encoding stdout as sys.stdout encoding 'utf-8'
0.241 creating repository in file:///tmp/testbzr-454ljz.tmp/bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch/work/bzrbranch/.bzr/.
0.262 creating branch <bzrlib.branch.BzrBranchFormat7 object at 0x3deed10> in file:///tmp/testbzr-454ljz.tmp/bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch/work/bzrbranch/
0.272 trying to create missing lock '/tmp/testbzr-454ljz.tmp/bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch/work/bzrbranch/.bzr/checkout/dirstate'
0.273 opening working tree '/tmp/testbzr-454ljz.tmp/bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_branch/work/bzrbranch'
    INFO Branched 1 revision.
0.323 errors:
'/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.\n return self.repository._git.ref(self.ref or "HEAD")\nBranched 1 revision.\n'
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/tests/test_blackbox.py", line 77, in test_branch
    error)
  File "/usr/lib/python2.7/unittest/case.py", line 424, in assertTrue
    raise self.failureException(msg)
AssertionError: /usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.
  return self.repository._git.ref(self.ref or "HEAD")
Branched 1 revision.

======================================================================
FAIL: bzrlib.plugins.git.tests.test_blackbox.TestGitBlackBox.test_info_verbose
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: log: {{{
0.612 run bzr: ['info', '-v']
0.613 bazaar version: 2.6.0
0.613 bzr arguments: [u'info', u'-v']
0.614 encoding stdout as sys.stdout encoding 'utf-8'
0.642 output:
'Standalone tree (format: git)\nLocation:\n branch root: .\n\nFormat:\n control: Local Git Repository\n working tree: Git Working Tree\n branch: Git Branch\n repository: Git Repository\n\nControl directory:\n 2 branches\n\nIn the working tree:\n 0 unchanged\n 0 modified\n 0 added\n 1 removed\n 0 renamed\n 0 unknown\n 0 ignored\n 0 versioned subdirectories\n\nBranch history:\n 1 revision\n 0 days old\n first revision: Fri 2014-01-17 09:04:10 +0000\n latest revision: Fri 2014-01-17 09:04:10 +0000\n\nRepository:\n 1 revision\n'
0.642 errors:
'/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.\n return self.repository._git.ref(self.ref or "HEAD")\n'
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/tests/test_blackbox.py", line 106, in test_info_verbose
    self.assertEqual(error, '')
  File "/usr/lib/python2.7/dist-packages/bzrlib/tests/__init__.py", line 1360, in assertEqual
    pprint.pformat(a), pprint.pformat(b)))
AssertionError: not equal:
a = '/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/branch.py:558: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.\n return self.repository._git.ref(self.ref or "HEAD")\n'
b = ''

----------------------------------------------------------------------
Ran 244 tests in 1.804s

FAILED (failures=3, known_failure_count=2)
1 test skipped

Revision history for this message
Martin Pitt (pitti) wrote :

Trivial patch. Tests succeed again.

summary: - two test failures: DeprecationWarning: Repo.ref(name) is deprecated. Use
+ test failures: DeprecationWarning: Repo.ref(name) is deprecated. Use
Repo.refs[name] instead.
Changed in bzr-git (Ubuntu):
status: New → Fix Committed
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: test failures: DeprecationWarning: Repo.ref(name) is deprecated. Use Repo.refs[name] instead.

This bug was fixed in the package bzr-git - 0.6.12-2ubuntu1

---------------
bzr-git (0.6.12-2ubuntu1) trusty; urgency=medium

  * Add deprecated_repo_ref.diff: Fix deprecated Repo.ref(), to make testsuite
    succeed again. (LP: #1270075)
 -- Martin Pitt <email address hidden> Fri, 17 Jan 2014 10:11:40 +0100

Changed in bzr-git (Ubuntu):
status: Fix Committed → Fix Released
Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: New → Confirmed
assignee: nobody → Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: Confirmed → Fix Committed
Revision history for this message
Israel Dahl (israeldahl) wrote :

Hi, I think this might be related to this bug...

I run
$ bzr git-import git://github.com/LMMS/lmms.git

and expect it to import the github code (though there is no documentation on how to do this that I can find)

and recieve this:

bzr: ERROR: exceptions.AttributeError: 'BazaarObjectStore' object has no attribute 'get_graph_walker'

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/commands.py", line 122, in run
    refs = interrepo.fetch()
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/fetch.py", line 657, in fetch
    mapping)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/git/fetch.py", line 705, in fetch_objects
    graph_walker = store.get_graph_walker(
AttributeError: 'BazaarObjectStore' object has no attribute 'get_graph_walker'

bzr 2.7.0dev1 on python 2.7.6 (Linux-3.13.0-9-generic-i686-athlon-with-
    Ubuntu-14.04-trusty)
arguments: ['/usr/bin/bzr', 'git-import', 'git://github.com/LMMS/lmms.git']
plugins: bash_completion[2.7.0dev1], builddeb[2.8.6], bzrtools[2.6.0],
    changelog_merge[2.7.0dev1], explorer[1.3.0], fastimport[0.13.0],
    git[0.6.12], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], qbzr[0.23.0], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

If I need to file a separate bug I will.
If I am simply doing this command wrong, please include some sort of man page for this so I can understand the usage.
I have tried
man bzr-git
help bzr-git
and the same with git-import, which obviously don't exist.. (maybe that should be a bug)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Israel,

That's a different issue caused by other upstream changes in Dulwich.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Please file a new bug.

Jelmer Vernooij (jelmer)
Changed in brz-git:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in brz-git:
milestone: none → integration
Jelmer Vernooij (jelmer)
affects: brz-git → brz
Changed in brz:
milestone: integration → none
milestone: none → 3.0.0
summary: - test failures: DeprecationWarning: Repo.ref(name) is deprecated. Use
- Repo.refs[name] instead.
+ git: test failures: DeprecationWarning: Repo.ref(name) is deprecated.
+ Use Repo.refs[name] instead.
Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.