Hi Jaap, hi all.

Le samedi 19 juillet 2008 à 14:41 +0200, Jaap Karssenberg a écrit :

> For housekeeping in the directory structure I guess I need to call 'svn 
> add', 'svn move' and  'svn delete' when creating, moving and deleting 
> files and directories. Any other commands needed to keep the directory 
> structure neat ?

I don't see another command for a basic everyday work : Add,
move/rename, delete.

> Diff and annotate seem to work more or less the same as in bzr. Guess I 
> need -r N:M to diff two versions.

Right. I don't know if you will visualise diffs in Zim. An alternative
could be to be able to define an external program (meld for example), as
we can already define a web browser, a file browser, a text editor and
an email client.

> Which other actions are usefull to have in the tools menu ? The current 
> svn plugin has checkout, refresh, apply, import and cleanup. For bazaar 
> I plan to only have a "save version" (commit), "pull update" (update) 
> and "push update" (commit to server). Initializing a repository would be 
> part of the  "new  notebook"  prompt. 

Maybe, from time to time, you need to exclude a document or a set of
documents from versionning, i.e add a 'svn:ignore' property (see below).

Use case 1 : you  have a notebook and don't want to version pictures in
Use case 2 : in your notebook, you use a folder and its sub-files as a
scratchpad, and a second folder as a definitive place for your
documents, and you only want/need to version the last one.

So, a 'add ignore property' could be useful (the ignore property is the
one a use most often ; other properties could also have an interest :
svn:Date, svn:Author, or custom properties. It depends. A more generic
'properties' action could be more useful).

Also, i don't know how you want to deal with possible version conflicts
when multiple users are editing a notebook, during commit or update. As
said above, calling an external editor as Meld through a 'diff' menu
could be helpful to visualise diffs and editing the document (the same
way we can edit source of a zim file with an external text editor).

> Btw. how do I set svn to ignore 
> the hidden dir ".zim" - or does it do so by default ?

All files, even the hidden ones are/can be versionned. To avoid that,
you must add a 'property' to the working copy saying that versionning
must ignore those files/dirs, like this :

svn propset propertyName propertyValue path

So, Initialising a repository on the "new notebook prompt" could be done
like this :

# create svn repository for the notebook
svn mkdir -m "myNoteBook repository
creation" /url/to/svn/repository/noteBook
# initial checkout (creation of the notebook's dir)
svn checkout /url/to/svn/repository/noteBook /path/to/my/noteBook
# set svn property to ignore zim stuff
svn propset svn:ignore .zim /path/to/my/noteBook

(you can use glob patterns for the property value, i.e. '.*' to ignore
all hidden stuff).

Versionning an already created notebook (i don't know if it's a planned
feature) could be a little difficult : a file already versionned cannot
be 'unversionned' with a svn:ignore. So, when importing the notebook to
the svn repository, "zim stuff" as to be "put out" of the process.
Something like this maybe :

# create svn repository for the notebook
svn mkdir -m "myNoteBook repository
creation" /url/to/svn/repository/noteBook
# initial import
svn import -m "Initial
import" /path/to/my/noteBook /url/to/svn/repository/noteBook
# deleting what we don't want to version in the repository
svn delete -m "deleting .zim dir" /url/to/svn/repository/noteBook/.zim
# move original .zim dir into a tmp folder
mv /path/to/my/motebook/.zim /tmp/.zim
# delete the initial notebook dir
rm -fr /path/to/my/notebook
# checkout a working copy of the notebook
svn checkout /url/to/svn/repository/noteBook /path/to/my/noteBook
# set svn property to ignore zim stuff
svn propset svn:ignore .zim /path/to/my/noteBook
# replace the original .zim dir
mv /tmp/.zim /path/to/my/noteBook/.zim

There is a way to set global ignores, but it can only be applied if you
are the administrator of the svn server. Useful for a local versionning
system (you can define svn repositories using file urls, i.e
file:///home/login/path/to/svn/repository/), not when you work with a
remote svn server.

Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to