Using bzr as backend is difficult.

John Meinel john at arbash-meinel.com
Wed Apr 11 06:57:26 UTC 2012


You must .lock_write a memory tree to do anything with it.

John
=:->
On Apr 11, 2012 8:27 AM, "INADA Naoki" <songofacandy at gmail.com> wrote:

> Thank you for quick reply.
>
> I try MemoryTree with IPython but I still can't make commit.
>
>
> In [41]: mt =
> bzrlib.memorytree.MemoryTree.create_on_branch(bzrlib.branch.Branch.open('.'))
> In [42]: mt.list_files()
> ---------------------------------------------------------------------------
> NotImplementedError                       Traceback (most recent call last)
> /home/inada-n/work/bzr/bzr/<ipython-input-42-21b2fa0b439e> in <module>()
> ----> 1 mt.list_files()
>
> /home/inada-n/local/python/lib/python2.7/site-packages/bzrlib/tree.pyc
> in list_files(self, include_root, from_dir, recursive)
>    205             inventory entry)
>    206         """
> --> 207         raise NotImplementedError(self.list_files)
>    208
>    209     def iter_references(self):
>
> NotImplementedError: <bound method MemoryTree.list_files of
> <bzrlib.memorytree.MemoryTree object at 0x2ed6a90>>
>
> In [47]: t=mt._file_transport
> In [51]: t.put_bytes("testfile", "testtest")
> Out[51]: 8
> In [52]: mt.add("testfile")
> In [55]: mt.commit(message="test commit")
> Out[55]: 'songofacandy at gmail.com-20120411061113-ica4hlqmifnuttdy'
> In [57]: !bzr diff -c-1
> <no outout>
>
>
>
> On Wed, Apr 11, 2012 at 2:35 PM, John Meinel <john at arbash-meinel.com>
> wrote:
> > You may want to look at MemoryTree. I don't think it would scale to huge
> > trees, but it does support commit and rename, I believe.
> >
> > John
> > =:->
> >
> > On Apr 11, 2012 6:49 AM, "INADA Naoki" <songofacandy at gmail.com> wrote:
> >>
> >> I want to write web based html editor with bazaar backend.
> >> I found wikkid uses TransformPreview for using bazaar branch as a
> backend.
> >>
> >> But TransformPreview doesn't provide any tutorial for making commit and
> >> it's API is not easy to understand. For example, how to make trans_id
> >> for second argument of TransformPreview.new_file? How I can rename file?
> >>
> >> Does Bazaar provide more easy way to make commit without workingtree?
> >>
> >> --
> >> INADA Naoki  <songofacandy at gmail.com>
> >>
> >
>
>
>
> --
> INADA Naoki  <songofacandy at gmail.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20120411/8e5d4177/attachment-0001.html>


More information about the bazaar mailing list