/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/commands.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-01-02 23:51:16 UTC
  • mfrom: (7233.2.2 git-objects)
  • Revision ID: breezy.the.bot@gmail.com-20190102235116-oca00uzw06u6yds0
Fix 'brz git-objects', and add a test.

Merged from https://code.launchpad.net/~jelmer/brz/git-objects/+merge/361362

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
        from .object_store import (
195
195
            get_object_store,
196
196
            )
197
 
        from . import gettext
 
197
        from ..i18n import gettext
198
198
        controldir, _ = ControlDir.open_containing(directory)
199
199
        repo = controldir.find_repository()
200
200
        object_store = get_object_store(repo)
201
201
        with object_store.lock_read():
202
202
            if sha1 is not None:
203
203
                try:
204
 
                    obj = object_store[str(sha1)]
 
204
                    obj = object_store[sha1.encode('ascii')]
205
205
                except KeyError:
206
206
                    raise BzrCommandError(
207
207
                        gettext("Object not found: %s") % sha1)
212
212
                self.outf.write(text)
213
213
            else:
214
214
                for sha1 in object_store:
215
 
                    self.outf.write("%s\n" % sha1)
 
215
                    self.outf.write("%s\n" % sha1.decode('ascii'))
216
216
 
217
217
 
218
218
class cmd_git_refs(Command):
265
265
        :param f: Patch file to read.
266
266
        :param signoff: Add Signed-Off-By flag.
267
267
        """
268
 
        from . import gettext
 
268
        from ..i18n import gettext
269
269
        from ..errors import BzrCommandError
270
270
        from dulwich.patch import git_am_patch_split
271
271
        import subprocess