Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Save always as "Version" ...
Save always as "Version" ...
 
   NeoOffice Forum Index -> New Features Program
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Aug 23, 2007 2:12 pm    Post subject:

Katzenstreu wrote:
Now the makro runs, but with problems. It can't create the dir in /tim/.ooosvn.


It sounds like the macro is incorrectly guessing what your Home folder is. Maybe the macro author has some insight on why /tim is being used instead of /Users/tim.

Patrick
Back to top
edh
Blue Pill


Joined: Aug 23, 2007
Posts: 3

PostPosted: Fri Aug 24, 2007 1:19 am    Post subject:

It is not hardcoded to use ~/. Instead it uses the Home directory that is specified in OOo in Tools > Options > OpenOffice.org > Paths. As by default OOo uses ~/, the working directory ~/.ooosvn gets created. What it appears is that your home directory in OOo is listed as / which it can't write too.
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Fri Aug 24, 2007 9:32 am    Post subject:

And there are many good reasons why you should not use / as your home directory...

-Oz
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 24, 2007 9:52 am    Post subject:

By default, neither OOo X11 nor NeoOffice have a "Home" entry in Tools :: Options :: NeoOffice :: Paths.

Could it be that the SVN extension assumes that this entry is always there and then, when it doesn't, is defaulting to "/"? If so, sounds like a bug in the SVN extension.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Fri Aug 24, 2007 10:13 am    Post subject:

OK I installed OOoSVN and I couldn't get it to work either. I checked in Tools > Options… > NeoOffice > Paths, and the path for "My Documents" is /Users/username.

With a document open, when I selected SVN > Place under version control, I got a Baisc runtime error (something like "File could not be found"), and the debugger showed up. There seemed to be an issue with svnadmin, so I edited the macro (changed "svnadmin" to "/usr/local/bin/svnadmin", because typing "svn" or "svnadmin" in Terminal gave me a "command not found" message). I tried to run the macro again, and got another error message saying that OOoSVN only supports svnadmin 1.3 or higher, and claiming that I had either got an older version of svnadmin, or no svnadmin at all. I quit the debugger (without saving the edited macro, FWIW) and switched to Terminal. I typed:
Code:
/usr/local/bin/svnadmin --version
which returned:
Code:
svnadmin, version 1.4.4 (r25188)
   compiled Jun 15 2007, 09:34:00

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository back-end (FS) modules are available:

* fs_base : Module for working with a Berkeley DB repository.
* fs_fs : Module for working with a plain file (FSFS) repository.


I then switched back to NeoOffice, tried SVN > Place under version control again, and it worked Question I haven't tried other functions yet.
Back to top
Katzenstreu
Red Pill


Joined: Apr 06, 2007
Posts: 8

PostPosted: Fri Aug 24, 2007 10:30 am    Post subject:

Thanks Samwise,

I replaced the string 6 times. Now I've other failures.
"Version Info" shows only the blue "i", but no versionnumber.
But I can place the document under versioncontrol. So far, so god.

I saved one document with other content sometimes, but the plugin don't saves different versions. There are no versions. I can resore the document, but no version.

I can't compare with older/newer version.

What a pity,
Tim Smile
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Fri Aug 24, 2007 10:32 am    Post subject:

Now I know how I got it fixed.

I've been able to reproduce the issue by removing the OOoSVN extension and deleting ~/.ooosvn. The error I get is "BASIC runtime error. File not found." and happens when executing the following line:

Code:
ret = Shell("svnadmin create --fs-type fsfs", 6, WorkingDir,true)


I've then changed the macro to use the full path to svnadmin, and got the following error: "OOoSVN is supported for use with SVN >=1.3. You either have too early a version or don't have it installed. Using the latest stable version of SVN is recommended. Please check your distros package manager. Setup will continue but OOoSVN may not fucntion correctly." (underlined is what I missed in the first place).

So the issue is probably not caused by OOoSVN itself, but by the Subversion installer found on subversion.tigris.org, which doesn't set the path to svn correctly. Also, my "fix" is only a partial fix as it won't allow OOoSVN to see the svn commands after creating the .ooosvn directory, making it non-functional. The good news is that it should be pretty easy to fix (just can't remeber how to add /usr/local/bin to my bash shell though).
Back to top
val1984
Oracle


Joined: May 30, 2005
Posts: 229
Location: France

PostPosted: Fri Aug 24, 2007 1:53 pm    Post subject:

Samwise wrote:
(just can't remeber how to add /usr/local/bin to my bash shell though).

If you're using Bash, this should work :
Code:
echo "export PATH=/opt/local/bin:$PATH" >> ~/.profile

Cheers Smile
Valentin
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Fri Aug 24, 2007 2:41 pm    Post subject:

Thanks. I manually edited my ~/.profile file (which was already created by MacPorts), but I was still looking for a way to do this without emacs or a similar program. So the original poster would need to type or copy/paste:

Code:
echo "export PATH=/usr/local/bin:$PATH" >> ~/.profile


in a Terminal window and press return.

However, even after adding /usr/local/bin, OOoSVN still gave me the "SVN is too old" error and doesn't seem to work properly Sad
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 24, 2007 4:15 pm    Post subject:

Samwise wrote:
However, even after adding /usr/local/bin, OOoSVN still gave me the "SVN is too old" error and doesn't seem to work properly Sad


The Finder's path (and all applications launched from the Finder) is set at login from the ~/.MacOSX/environment.plist. See this article for more info:

http://developer.apple.com/qa/qa2001/qa1067.html

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Fri Aug 24, 2007 4:30 pm    Post subject:

Thanks. After adding /usr/local/bin, OOoSVN was able to find svnadmin and other svn* commands, without having to edit the macro, so I'm not sure this is the issue. But I'll try creating this directory and plist tomorrow.

How do I go about setting the path though? Should I use "PATH" as the environment variable, and /usr/local/bin for the value?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 24, 2007 4:47 pm    Post subject:

Samwise wrote:
How do I go about setting the path though? Should I use "PATH" as the environment variable, and /usr/local/bin for the value?


I think you need to your entire colon-separated list of PATH directories as the value, not just /usr/local/bin.

Patrick
Back to top
Samwise
Captain Naiobi


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Sat Aug 25, 2007 8:21 am    Post subject:

You were right about the .MacOSX/environment.plist: once you set the full PATH, OOoSVN works as expected. Adding /usr/local/bin to Terminal's PATH actually didn't do anything; I had accidentally saved the modified macro with the "svnadmin" -> "/usr/local/bin/svnadmin" modification Embarassed !

Katzenstreu, here's what you can do:

1) Open the TextEdit aplication;

2) Choose "Make Plain Text" from the Format menu;

3) Copy/paste the following text in TextEdit:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
   <key>PATH</key>
   <string>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin</string>
</dict>
</plist>

4) Save the file to the Desktop as "environment.txt" (without the quotes, and case-sensitive);

5) Open the Terminal application;

6) Copy/paste the following commands in a Terminal window and press return:
Code:
mkdir ~/.MacOSX; mv ~/Desktop/environment.txt ~/.MacOSX/environment.plist

7) Log out, then log in again (or restart). OOoSVN should now work.
Back to top
edh
Blue Pill


Joined: Aug 23, 2007
Posts: 3

PostPosted: Sat Sep 01, 2007 1:15 pm    Post subject:

This thread has turned up quite a lot of useful info. I will try and point OSX users in this direction in future. Thanks again for using OOoSVN and if there's any issues or feature requests, use the SF Tracker:
http://sourceforge.net/tracker/?group_id=188404
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sat Sep 01, 2007 1:31 pm    Post subject:

Samwise wrote:
6) Copy/paste the following commands in a Terminal window and press return:
Code:
mkdir ~/.MacOSX; mv ~/Desktop/environment.txt ~/.MacOSX/environment.plist

You should check to make sure this file doesn't already exist first. I have one and I don't ever recall changing it Wink

As an alternative, RCEnvironment allows editing of the file.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> New Features Program All times are GMT - 7 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.