zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #00042
Re: Subversion support
Hi Rui,
Thanks for your detailed testing. Action items for me and general
comments below.
On Sat, Oct 11, 2008 at 9:25 PM, Rui Nibau <ruinibau@xxxxxxxx> wrote:
> 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
... 8< ...
> 1. Project already versioned
... 8< ...
> 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.
Action item #1: note about svn:ignore in the user manual
> 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.
Hmm, this will be tricky, because it has to match the exact
localization of the installed subversion version. Problem is that
although svn prints an error it does not return an error code I can
detect.
Is there an alternative svn command to query existence of the url ? Or
should I just call mkdir and assume the location exists when it fails
?
Action item #2: fix detection of existence of repository directory
> 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.
Correct, but I put it there just to hint the user that an full URL is expected.
> 3. Working with a versionned notebook
> --------------------------------------------------------------------------------
... 8< ...
> 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.
Action item #3: check why cleaning up of empty folders does not work
>
> 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.
Action item #4: fix typo in the code Zmi -> Zim ... :S
> 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
The wanted behavior of revert is that the specified version is rolled
back and committed to the repository as a new version. Will it work
that way with this command ? What is the difference / advantage over
using svn cat ?
> 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).
Cleanup is not part of Subversion.pm - from the manual I understood
this is a maintenance routine you should not need too often. Hence I
put it in the Subversion plugin
(share/zim/plugins/VersionControl/Subversion.pl).
> 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 )
Action item #5: Fix parsing of the revision message.
> 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).
When testing svn I noticed I do some redundant calls to the external
executable when scanning the directory structure. Will remove them.
Action item #6: Check external calls when creating a directory object.
... 8<...
> 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.
I have seen this before, but only on windows. Probably a combination
of gtk and or specific window manager.
Please open a bug report for this and include first part of the zim -V
output were it gives the gtk version numbers etc.
Regards,
Jaap <pardus@xxxxxxxx>
Follow ups
References