zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #00038
Re: Subversion support
Hi all.
Sorry for the length of this message.
All tests above are made with the latest Zim snapshot (0.26) provide by
Jaap in the tmp folder, under Ubuntu 8.04, with subversion version 1.5.1
(r32289), bazaar 1.3.1.
About subversion
================================================================================
- All zim actions are matched / tested against svn command line
equivalents.
- I'm using local repos, i.e. 'file:///' urls. I've created a dedicated
svn repos to avoid any potential conflict with other projects already
versioned.
1. Project already versioned
--------------------------------------------------------------------------------
Using a simple project already versioned, then defining it as a Zim
notebook.
Project tree :
page1
page1-1
page2
The versioning is recognized and you can work with it.
By the way, if users wants to use an already versioned project as a zim
notebook, they have to define themselves a svn:ignore property to
avoid .zim folder to be versioned (this is automatically done when you
start versioning with Zim).
Note : ignoring .zim folder
............................
Maybe that could be done with Zim but certainly with great difficulties
because you have to deal with eventual already defined svn:ignore
properties (as a versioned property or as a repository revision
property). If it's defined as repository revision property in the latest
revision, you must have the right to modify it ; next you have to edit
it. And, most important, i can ONLY work if the project isn't a Zim
notebook yet (the .zim folder hasn't been versioned).
Too much work for a problem that isn't really annoying and that
shouldn't be really common. A user warning on the manual should be
enough.
2. Start versioning with Zim
--------------------------------------------------------------------------------
I create a Zim notebook with a couple of pages, then try to version it.
2.1. Start versioning ............................................... KO
Importing the notebook doesn't work i f the folder in the repos doesn't
exist.
In the init function, you check if svn info output contains "(Not a
valid URL)" (line 74). In my operating system (french), the svn info
command returns a string containing "(URL non valide)". Seems that test
string should be localized.
Note : url field
..................
In the repository dialog window : maybe the 'http' it's not really
necessary for the url field, since you can also connect to a svn repos
with "file://" or 'svn://' protocols.
3. Working with a versionned notebook
--------------------------------------------------------------------------------
3.1. add a page then commit ...................................... OK
3.2. remove a page then commit ................................... OK
3.3. rename a page then commit ................................... OK
3.4. add a page in a namespace then commit ....................... OK
3.5. remove a page in a namespace then commit .................. ~ OK
If the namespace is empty, the folder itself isn't deleted. So,
if i delete 'page1-1' and commit, the folder 'page1' is still
in the repos.
It could be annoying if users have the habit to delete a lot of
namespaces.
3.6. rename a namespace .......................................... OK
3.7. Restore a previous version of a page ........................ KO
The restore function doesn't seem to work. Here's Zim output :
## dispatch Versions: (Zim::GUI)
## AUTOLOAD Zim::GUI::VersionsDialog
# svn log "/home/[login]/zim_svn/project1/page1.txt"
# svn cat "-r" 5 "/home/[login]/zim_svn/project1/page1.txt"
*** unhandled exception in callback:
*** Can't locate object method "new" via package
"Zmi::FS::File" (perhaps you forgot to load "Zmi::FS::File"?)
at /usr/local/share/perl/5.8.8/Zim/FS/Subversion.pm line 130.
*** ignoring at /usr/local/bin/zim line 332.
In the 'revert' function (Subversion.pm) that you try to use
the 'revert' svn command or simply rewrite the file with the
output of the 'cat' svn command. Maybe you could try the
'update' svn command, i.e. if you want to revert the file
foo.txt to revision 5, you can do :
svn update -r 5 foo.txt
Note : Working with a copy (c1) then update another copy (c2)
..............................................................................
Updating works fine. It sometimes fails if the working copy is locked
(why is it locked ? Maybe some wrong manipulation). Maybe a 'svn
cleanup' before the update could be useful (didn't see where you deal
with update in Subversion.pm).
Global note : message textarea
................................
In the details textarea of the version window, which have to show the
commit message, the text always begin with a 'e' (see a screenshot here:
http://www.omacronides.com/tmp/zim_version_dialog.png )
About bazaar : slowing the index pane building
================================================================================
I'm playing with bazaar since a couple of weeks. The first contact is
quite good so i tried the Zim plugin.
I versioned (with bzr, not Zim) a notebook then opened it : don't know
why but the index pane take much time to appear than a "normal"
notebook. Sometimes, it even freezes the application for a couple os
seconds (but it never crashed).
I didn't test all the features of course, just the common stuff (add,
remove). It seems to work pretty well. Great job Jaap.
About other things
================================================================================
Not really important or annoying, except maybe the first one.
key-bindings : <space> and <control>+<space>
--------------------------------------------------------------------------------
Don't know why but if i hit <space> in the editor pane, it gives focus
to the index pane (what should happened if i have done a
<control>+<space>). To correct that, i have to disable the "use
Ctrl-space" option in the interface tab of the preference window.
About focus on windows
--------------------------------------------------------------------------------
I took a look at the bug list and didn't see any related entry. Don't
know if it's a bug or a feature.
Use case 1 :
- you're working with a notebook and need to take a look at another one.
- you go to the file menu and click "open another notebook..." (or type
CTRL+o)
- the "open notebook" dialog pops up. In fact, it **pops under** : the
main window (notebook) still have the focus and you have to manualy
switch to the dialog window.
- you select a notebook and click "open" : again, the new window pops
under and you have to manually switch to it.
Use case 2 :
- you have a notebook opened but "closed" (reduced in the toolbar)
- you're working in another application and need to pick up some info
from this notebook
- you click the Zim icon in the toolbar : the notebook window also pops
under the application window where you're working in.
Regards,
--
Rui Nibau <ruinibau@xxxxxxxx>
Développeur web, rédacteur scientifique
http://www.omacronides.com
http://www.framasoft.net
Follow ups
References