[rkward-users] Relative paths in RKWard WorkPlace

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Dec 4 10:25:54 UTC 2013


Hi!

On Monday 02 December 2013 05:27:10 Francois Maurice wrote:
> I try to put a R WorkSpace (.RData file) under version control using
> Subversion.
> 
> But I have a problem with RKWard WorkPlace. RKWard seems to save script
> files in the workplace with absolute paths. So, from one svn working copy
> to another, I must reload the script files in RKWard workplace.
> 
> Is there a way to specify a base path, say to the working copy root, and
> saving the script files in the RKWard workplace with paths relative to that
> base path ?

RKWard will save the base path, if (and only if) the workspace itself has a 
known URL, i.e., you saved the workspace (not workplace) somewhere, and 
rk.get.workspace.url() returns non-NULL. Then, when opening the workplace 
description, RKWard will

1. Try to open each file at the old absolute url
2. If the file cannot be found, there, and it is a local url, calculate the 
relative path from previous workspace url to current workspace url, add that 
relative path to the url in question, and see if the file can be found, there.

Thus, what you are looking for should work, but only when working with a saved 
workspace (both when saving, and when loading).

I can see that the ability to specify a custom base url and / or relative url 
adjustment might be useful. Consider opening a feature request ticket.

Currently, I think the only workaround will be to edit the .rkworkplace file, 
directly. The format may be somewhat silly, but it's a plain text file, and 
editing the urls should be straight-forward.

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20131204/84e807d2/attachment.sig>


More information about the Rkward-users mailing list