Bug 164732 - Integration of Mercurial
Summary: Integration of Mercurial
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Gentoo Packages OpenBSD
: NOR wishlist
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 11:24 UTC by Arne Babenhauserheide
Modified: 2012-01-20 19:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.0


Attachments
tortoisehg-kde.desktop version 0.0 (275 bytes, application/x-desktop)
2009-09-10 09:18 UTC, Arne Babenhauserheide
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2008-06-23 11:24:10 UTC
Version:            (using KDE 4.0.80)
Installed from:    Gentoo Packages
OS:                OpenBSD

Hi, 

I've been using Mercurial (a distributed version control system) very much lately (for anything from code over websites (with automatic upload hook), stories and songs to recorded audio files), and when I installed TortoiseHG on a friends Windows machine, I was fascinated by the ease with which he could use version control, without ever having to touch the console. 

Files and folders had overlay icons which showed their state (up to date, locally changed or untracked), and he could do everything from the GUI. 

Naturally I'd love to have this feature in KDE, too. 


At the moment, some work for TortoiseHG is spent on integrating it with Nautilus, but I much prefer Dolphin (and KDE), so I'd love to be able to just select from the GUI: 

"Initialize version control for this folder"

And then be able to right-click files and select "track file" and right-click the background or the main folder and say "commit changes", to be greeted with a nice commit dialog which asks me which files I want to commit and which commit message I want to add. Or click the main folder or its background and say "share folder" to serve a folder via the integrated Mercurial webserver, so others can very easily pull my changes. 

Naturally it would also be great, if the same could be done for SVN and other version control systems. 

The advantage of distributed systems like Mercurial is, though, that every user can just initialize a repository anywhere and then add any files without much hassle. 

For example an author could just version control his text files and work together with others, without having to know the console. 


Necessary basic commands (for example in right-click menus): 
-> clone a repository
-> initialize a repository
-> maybe convert a repository. 

These could be put into a single dialog (create repository), so there would be only one menu entry, and the dialog could be adapted for different version control systems. 

Everything else would only be shown, when clicking on version controlled files or folders. 


Besides: I love the way I can already work with dolphin! Many thanks for your great work! 

Links: 
- TortoiseHG: http://tortoisehg.sourceforge.net/
- Mercurial: http://www.selenic.com/mercurial/

Related: 
- Manage Websites with Mercurial (in german): http://draketo.de/deutsch/freie-software/licht/webseiten-aktualisieren-mit-mercurial-und-lftp
Comment 1 Arne Babenhauserheide 2008-12-19 03:12:36 UTC
Can you give me a status on this bug? 

Is there already someone working on Mercurial integration for KDE/Konqueror/Dolphin? 
Comment 2 Arne Babenhauserheide 2008-12-19 03:24:13 UTC
Besides: The OS is slightly incorrect: Mercurial is written in Python and with that it's mostly OS independent (the Bug states OpenBSD - I'm quite sure that I am the one who did the mistake with that...). 

TortoiseHG currently uses gtk dialogs, and it is available on GNU/Linux systems as standalone via "hgtk". 

But there are also some Qt based GUI tools, though none of thee i as integrated as I'd wish them to be: 
- synchronize: http://pmpu.sharesource.org/
- commit: http://qct.sourceforge.net/
- logviewer: http://www.logilab.org/project/hgview

more: http://www.selenic.com/mercurial/wiki/index.cgi/OtherTools
Comment 3 Peter Penz 2008-12-19 07:54:24 UTC
> Is there already someone working on Mercurial integration
> for KDE/Konqueror/Dolphin?

I don't know honestly speaking. This task can be done without touching any code in Dolphin by creating a service menu (see http://techbase.kde.org/index.php?title=Development/Tutorials/Creating_Konqueror_Service_Menus for details). A lot of service menus are available at www.kde-apps.org, maybe someone already has written such a menu :-) For later KDE versions it is planned to provide a GUI to download such service menus without the need of a manual installation.
Comment 4 Arne Babenhauserheide 2009-01-11 13:23:52 UTC
Can a service menu add overlay icons to files (as TortoiseHG does)? 
- Example: http://tortoisehg.sourceforge.net/images/screenshots/tortoisehg-snapshot-overlayicons.png
Comment 5 Peter Penz 2009-01-11 17:05:26 UTC
No, this would not be possible with a service menu. There are plans to make such kind of overlays possible, but I'm not sure whether we can make this available for KDE 4.3 already...
Comment 6 Arne Babenhauserheide 2009-01-12 15:33:14 UTC
I'd be very happy to see that kind of integration as soon as possible; it's just not nice to look at the Windows boxes of people for whom I just installed Mercurial (with TortoiseHG) and think "Damn, is that convenient - why don't I have that?" :) 

Is there another way to integrate it than by using service menus? 
Comment 7 Peter Penz 2009-01-12 15:39:57 UTC
> Is there another way to integrate it than by using service menus? 

In Konqueror you could create a custom view as KPart plugin, but that's a lot of work and from my personal point of view no good approach...
Comment 8 Arne Babenhauserheide 2009-01-12 17:43:11 UTC
Then it seems I'd better wait till the service menu has overlay icon support. 

Thank you! 
Comment 9 Arne Babenhauserheide 2009-09-10 08:40:43 UTC
Can I let a service menu entry show only when a command completes successfully?
Comment 10 Arne Babenhauserheide 2009-09-10 09:12:25 UTC
I tried writing a service menu, but it doesn't seem to work. DId I miss something obvious? 

My desktop entry for synchronizing looks like this: 

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;application/octet-stream
Actions=hgSynchronize

[Desktop Action hgSynchronize]
Name=hgtk sync
GenericName=Synchronize
GenericName[de]=Synchronisieren
Exec=hgtk sync
Comment 11 Arne Babenhauserheide 2009-09-10 09:17:49 UTC
Sorry for the noise - works now: 

------ ------ ------ ------ ------ ------ 
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;application/octet-stream;
Actions=hgSynchronize

[Desktop Action hgSynchronize]
Name=hgtk sync
GenericName=Synchronize
GenericName[de]=Synchronisieren
Exec=/bin/sh -c "cd %u ; hgtk sync"
------ ------ ------ ------ ------ ------ 

Is there a way to make this show up when clicking on a folder background, too?
Comment 12 Arne Babenhauserheide 2009-09-10 09:18:45 UTC
Created attachment 36835 [details]
tortoisehg-kde.desktop version 0.0
Comment 13 Arne Babenhauserheide 2009-09-10 09:20:20 UTC
A reason I can think of is that there could have been a preloaded konqueror, so I had to open a new one two times.
Comment 14 Peter Penz 2009-09-10 18:43:48 UTC
Short update: Dolphin for KDE 4.4 will provide a mechanism for version control plugins. Currently only a test version for SVN has been written and it works quite well. So I'd suggest not spending too much time with the service menu mechanism, as the new mechanism allows context sensitive disabling/enabling of the menu entries...
Comment 15 Arne Babenhauserheide 2009-09-13 23:43:57 UTC
Good to know - many thanks for your info! 

Context sensitive enabling and disabling was one thing I searched for but couldn't find in the guide. 

I'm anxious to see 4.4! 

Version tracking in Dolphin will help me to stay in the GUI instead of switching between GUI and shell all the time, so its one of the features which are very likely to do a huge difference to me. 

Luckily the 2nd 4.4 beta is afer my exams, else I wouldn't be able to reap out enough time for learning ;)
Comment 16 Peter Penz 2011-02-05 13:49:31 UTC
Please install the kdesdk for SVN- and Git-support.
Comment 17 Arne Babenhauserheide 2011-02-06 23:49:13 UTC
I wohld not call this resolved, as the main part of the wish (Mercurial) still isn’t available. 

I tried adding the support myself, but did not find the proper integration points. Frankly I read over the code but didn’t know where to start adapting the git version to Mercurial. 

Git and Mercurial are very similar from their command set, so the adaption should not be too hard (and I’d gladly help with testing!). 

If there is no other bug specifically for Mercurial support, please reopen the Bug (or say OK and I’ll do it).
Comment 18 Peter Penz 2012-01-19 17:11:11 UTC
In kdesdk for KDE 4.8 Mercurial is available.
Comment 19 Arne Babenhauserheide 2012-01-20 19:30:48 UTC
Wow, many thanks! You’re great!