supporting user interfaces

Martin Pool mbp at sourcefrog.net
Mon Mar 28 04:50:44 BST 2005


jan wrote:
> I've started writing a simple emacs mode and need some info on how
> certain features are intended to be supported.
>
> Firstly, I'd like to support diff's between arbitrary revisions of a
> file but there are a couple of issues:
>
> a. Finding which versions are available.

Versions 0 through `bzr revno` are available.

 > It would be nice to have a
>    verbose option for the status command that prints all the info
>    available for the listed files.

What fields did you want?

I might support 'bzr info FILE' to get information about that particular
file.

> b. Extracting a revision of a file, preferably printed to stdout.

bzr cat -r REV foo.c

> I'd also like to support cherry-picking commits. I think this would be
> best supported by a commit-diff command eg.
>
> bzr commit_diff -m 'commit message' 'diff text'
> or
> bzr commit -m 'commit message' -d 'diff text'
>
> I could then write a cherry-picking mode for ediff taking (file, diff)
> as input and producing a subset of diff for output to commit-diff. It
> should also be possible to support splitting diff's to allow
> arbitrarily fine resolution of picking. All the complexity would
> remain external to bzr.

I think that would be great.

> Merging and conflict resolution needs to be considered aswell, at the
> moment I'm assuming that bazaar will do the hard work and on my end it
> will just involve hooking up emerge. Too optimistic?

I think for file merging it will try to do a merge itself, leaving the
results in foo.c possibly with conflict markers.  Also you will have
foo.c.BASE, foo.c.MINE and foo.c.OTHER (or something similar) which can
be used to run emerge or something else.  After fixing the problems, you
should run 'bzr resolved foo.c', which protects against accidentally
committing anything with conflict markers.

I'm not sure yet what interface will work well for inventory conflicts,
as when a file is renamed to different names in different branches.  At
the moment I am inclined to apply the remote change in most cases,
allowing the user to fix it up or revert it if they don't want it.

Anyhow, from emacs point of view the merge should be no harder than svn
or cvs.

I'm eager to see your work; at the moment I am just using "M-! bzr diff"
  in emacs.  You might talk to Luke (cc'd) who was also trying something.

--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050328/b1af1367/attachment.pgp 


More information about the bazaar mailing list