Re: Git repository browsers, drag'n'drop and backlinks



Holger Berndt wrote:
(Keeping giggle cc'ed, because I still hope this could
become a common drag type for git repo viewers.)

On Do, 31.12.2009 12:13, Jesse van den Kieboom wrote:

I'm also quite unsure about the real use case for this.

Okay, I did a draft implementation for gitg, and am therefore able
to provide a screenshot, see
http://img121.imageshack.us/img121/362/gitgtomboy.png

Please note that the connection is bidirectional: Drag-and-drop from
gitg into Tomboy results in link creation, and clicking the link fires
up a gitg instance with the given commit selected again.

The implementation consists of 3 parts:

Changes to gitg:

1. Make gitg offer drag from the commit list, with dnd type
"git/treeish-list" (if that were to become a gitg isle solution, that
should probably be x-gitg/treeish-list)
Ok, I've looked at this part and 'reimplemented' it in gitg because there is already DND handling for the refs and using gtk_drag_source_set interferes with this. Thus I've implemented it now in gitg-dnd.[ch]. Also it supports 3 selection targets:

x-gitg/treeish: <path>\n<sha1>: <subject>
text: <sha1>: <subject>\n\n<body>
uri: gitg://<path>:<sha1>
2. Make gitg recognise a --select command line option, which takes a
sha1, and selects this one after the repo has been loaded completely
I implemented this too (I modified a few things here). gitg now accepts uris in the form of gitg://<path>[:<sha1>] and installs itself as the default uri handler (for gnome at least). Additionally it also adds the --select option like you proposed (it's implemented is a bit more efficient and accepts partial hashes).
Code for these two is on git://github.com/hb/gitg.git
in the "dnd-commit-list" branch.


3. Receiver side (here: Addin for Tomboy to handle git/treeish-list
drops)
Code on
git://github.com/hb/tomboy-git-addin.git
Currently the tree view does not allow selecting multiple revisions, so it just exports one revision at the moment.

Any comments would be appreciated.

Holger



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]