Scrivener and Subversion?

ro
rosacordis
Posts: 3
Joined: Thu Feb 08, 2007 12:35 am

Thu Feb 08, 2007 1:12 am Post

Does anybody else use Subversion? I keep my rag-tag collection of writing files in it, to sync between two computers and also for the version control.

But, I'm having some problems with some Scrivener files. I know that Scrivener stores everything in individual files inside the .scriv package, but some of those individual files are reporting locking problems that I'm unable to resolve, so it's frustratingly blocking my check-ins.

Any Subversion whizzes out there know of what I speak?

Thanks!

User avatar
AmberV
Posts: 23814
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 08, 2007 3:42 am Post

Potentially dumb question, but you do not happen to have the Scrivener project open while attempting to synch, do you?
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

ro
rosacordis
Posts: 3
Joined: Thu Feb 08, 2007 12:35 am

Thu Feb 08, 2007 3:49 am Post

There are no dumb questions! Not in my case anyway.

But I can clarify that indeed the files were closed, as was Scrivener, before I tried to do any Subversion stuff from the command line. Usually my first order of business after editing a file was to run a "svn status" just to see if I need to add any files. If so, I'd add them.

After a few successful check in and outs, I was getting the tilde in my status reports on certain files, suggesting they were locked or being used by another file. Those files couldn't be added, locked, unlocked or removed. Running a cleanup wasn't successful either.

It's like they are being used by another program that is interfering with Subversion (or maybe the creation of the .svn folders?)

er
erikmkeller
Posts: 3
Joined: Thu Feb 08, 2007 12:27 pm

Thu Feb 08, 2007 12:56 pm Post

[quote="rosacordis"]It's like they are being used by another program that is interfering with Subversion (or maybe the creation of the .svn folders?)[/quote]

Your are right on the money. :wink:
I just tried 'svn status' on my test-project written in Scrivener, all folders from the initial import/first checkout phase have no .svn folder, which should be inside of them. svn complains that the folder is already under its control but .svn is missing:

'/4.rtfd/.svn' containing working copy admin area is missing'

My best guess at the moment is, that one of the Frameworks used by Scrivener "cleaned" them out of the rtfd folders.

Start nerdy hint for Keith:
Looks like 'AppKit' is to blame (a quick guess after a glance at the documentation in Xcode). Maybe one of the functions uses a filter for file-types that are allowed to be in a .rtfd?
End nerdy hint for Keith 8)

If I should figure something out, I'll post it here.

BTW: I'm very impressed with Scrivener, looks like I really might abandon the emacs/docbook combo I used for three books so far. I have to figure out a way to convert the final draft into XML, though.

Best,
Erik

User avatar
AmberV
Posts: 23814
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 08, 2007 3:11 pm Post

erikmkeller wrote:I have to figure out a way to convert the final draft into XML, though.


MultiMarkdown is really what you want, in that case. Scrivener without it produces an export entirely devoid of structure, and it would be extremely difficult to get that into a structural XML file. Using MMD->XHTML would give you an XML file that you could then transform using any variety of the XSLTs available on the 'net for XHTML. The one drawback is that it does not produce a hierarchal structure. In other words, a chapter heading is defined, then a paragraph is defined, then a chapter heading, and so on -- all on the same level. The Perl script that generates the XSLT could be modified to do something like:

Code: Select all

<div id="chapter1">
   <h3>Blah</h3>
   <div class="chapterbody">
      <p>blah</p>
   </div>
</div>
That would make the conversion with XSLTs a lot easier for some purposes.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
KB
Site Admin
Posts: 20718
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Feb 08, 2007 5:12 pm Post

Note that editing the individual files within the .scriv package in another application is not really recommended, and certainly not supported. :)
Best,
Keith

ro
rosacordis
Posts: 3
Joined: Thu Feb 08, 2007 12:35 am

Thu Feb 08, 2007 5:43 pm Post

I guess my support request has turned into a feature request: Keith, I would like to be able to use .scriv files with Subversion. In the meantime, I'm just zipping up every revision to share back and forth.

It's a bit of a pain, but worth it to use such a cool product.

er
erikmkeller
Posts: 3
Joined: Thu Feb 08, 2007 12:27 pm

Thu Feb 08, 2007 7:18 pm Post

Note that editing the individual files within the .scriv package in another application is not really recommended, and certainly not supported.

I guess that was meant for me :wink: . I don't intend to modify the files, I was thinking in the lines of some utility which could "resurrect" the missing .svn folders based on information of the enclosing folder's .svn.

@AmberV: Thanks for the hint. I think I'll be either, able to find an XSLT to transform XHTML to docbook-XML the way I need it, or, (in the spirit of this site) given a decent supply of Latte from my Espresso-machine, I'll do it myself. Might be more fun actually, to do it myself. I have to cater to my reputation as "writing geek" anyway. 8)

@Keith: The program is awesome.

Best,
Erik

User avatar
AmberV
Posts: 23814
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Feb 08, 2007 7:31 pm Post

erikmkeller wrote:...given a decent supply of Latte from my Espresso-machine...


My espresso machine is about to break, which is a somewhat scary thing, given all of that high pressure scalding steam.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
Eiron
Posts: 452
Joined: Tue Jul 11, 2006 4:01 pm

Thu Feb 08, 2007 7:56 pm Post

My espresso machine is about to break


So that's where all the steam on the forum is coming from. It's your fault.

E

User avatar
KB
Site Admin
Posts: 20718
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Feb 08, 2007 8:20 pm Post

Erik:

I guess that was meant for me ;).


Actually it was just the developer's standard "don't blame me if your computer blows up" caveat. :)

@Keith: The program is awesome.


Thanks. :)

I have to admit that I'm not really sure of the issues with Subversion, as I don't really use it. Is the problem just that it doesn't play well with folders (given that .scriv files are just folders)? If so, there's not much I can do about that, I'm afraid.

Sorry if I'm a bit vague - it's my son's third birthday, so I haven't been following discussions as closely today as I usually do...
Best,
Keith

User avatar
Eiron
Posts: 452
Joined: Tue Jul 11, 2006 4:01 pm

Thu Feb 08, 2007 8:28 pm Post

The one with the big nose? Wish him a happy birthday from us.

E

User avatar
KB
Site Admin
Posts: 20718
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Thu Feb 08, 2007 8:31 pm Post

Lol! :) You've got a good memory!
Best,
Keith

P.S. To other readers of this post: just for the record, my son has not got a big nose. This is a reference to a discussion about... Oh, nevermind, I have Cava to open.

er
erikmkeller
Posts: 3
Joined: Thu Feb 08, 2007 12:27 pm

Thu Feb 08, 2007 8:42 pm Post

@Keith: Not sure which timezone you're in, but if your son is still awake, get back to him. :)

I'll try to do some research into the whole .svn-thing tomorrow, if I can find the time. If something usable pops up, I'll let you know.

If I can get this to work, I might convince my editor to use Scrivener as well, we then could bounce the .scrivs back and forth and forget about sending PDFs or XML-Files; we would just do check-ins and check-outs in subversion.

Best,
Erik

Co
CountZero
Posts: 14
Joined: Sun Jan 07, 2007 5:28 pm
Location: NYC
Contact:

Thu Feb 08, 2007 9:41 pm Post

SVN handles folders just fine. I think it may be either SVN or the OS hosting SVN does not recognise some of the folder attributes that defines it as a package. That's my guess anyway since it is the only thing that stands out between regular folders/files vs. unit packages.