RDocTask and SVN

Hi,
I have a standard RDocTask in my rake file that creates my
documentation. However everytime I run rake rdoc, it removes my
document folder before rebuilding the new documentation which causes
havoc with svn. SVN puts a ~ next to this folder in svn status (I
assume because it thinks it’s still under version control but its .svn
folder is missing from it), and its not fixed until i remove everything
manually through svn commands. Is there a way to make this raketask
play nicer with svn?
Thanks,
Ray

On Fri, Feb 16, 2007, Raymond O’connor wrote:

I have a standard RDocTask in my rake file that creates my
documentation. However everytime I run rake rdoc, it removes my
document folder before rebuilding the new documentation which causes
havoc with svn. SVN puts a ~ next to this folder in svn status (I
assume because it thinks it’s still under version control but its .svn
folder is missing from it), and its not fixed until i remove everything
manually through svn commands. Is there a way to make this raketask
play nicer with svn?

My personal preference is to svn:ignore any directory that contains
solely content that is generated. That means my packages, rdoc, rcov,
etc are not in svn. If ever someone wants to read them, they can run
the tasks themselves.

This cuts down the size of your repository, the size and length (in
time) of your checkouts, and allows more freedom for your users (if, for
instance, they want to generate rdoc with a different template than you
use).

Ben

On Feb 15, 2007, at 15:00, Raymond O’connor wrote:

I have a standard RDocTask in my rake file that creates my
documentation. However everytime I run rake rdoc, it removes my
document folder before rebuilding the new documentation which causes
havoc with svn. SVN puts a ~ next to this folder in svn status (I
assume because it thinks it’s still under version control but its .svn
folder is missing from it), and its not fixed until i remove
everything
manually through svn commands. Is there a way to make this raketask
play nicer with svn?

svn rm doc; svn ci -m “Don’t need doc checked in it is generated with
rake rerdoc”

Ben B. wrote:

On Fri, Feb 16, 2007, Raymond O’connor wrote:

I have a standard RDocTask in my rake file that creates my
documentation. However everytime I run rake rdoc, it removes my
document folder before rebuilding the new documentation which causes
havoc with svn. SVN puts a ~ next to this folder in svn status (I
assume because it thinks it’s still under version control but its .svn
folder is missing from it), and its not fixed until i remove everything
manually through svn commands. Is there a way to make this raketask
play nicer with svn?

My personal preference is to svn:ignore any directory that contains
solely content that is generated. That means my packages, rdoc, rcov,
etc are not in svn. If ever someone wants to read them, they can run
the tasks themselves.

I agree with what you say, but this doesn’t solve the issue. This is
because when you run a command like:

svn propset svn:ignore ‘*’ doc

… the actual property itself is stored in the “.svn” directory of the
target directory (“doc/.svn” in this case). So, this will work as long
as that .svn directory remains intact. However, the rdoc tasks (i.e.
“rake rdoc” and “rake rerdoc”) both clobber everything in the target
directory when they run, including the “.svn” directory. So, if the
rdoc task is ever run, you’ll have to go through the whole song and
dance of setting the ignore property, etc again. Perhaps I’m missing
something in your solution? I’ve searched all over the web for a
solution to this, but all I’ve found so far is what you’re suggesting
here. I’m on OS X Leopard with ruby 1.8.6 if it makes a difference.

Ben Oakes wrote:

Ben B. wrote:

On Fri, Feb 16, 2007, Raymond O’connor wrote:

I have a standard RDocTask in my rake file that creates my
documentation. However everytime I run rake rdoc, it removes my
document folder before rebuilding the new documentation which causes
havoc with svn. SVN puts a ~ next to this folder in svn status (I
assume because it thinks it’s still under version control but its .svn
folder is missing from it), and its not fixed until i remove everything
manually through svn commands. Is there a way to make this raketask
play nicer with svn?

My personal preference is to svn:ignore any directory that contains
solely content that is generated. That means my packages, rdoc, rcov,
etc are not in svn. If ever someone wants to read them, they can run
the tasks themselves.

I agree with what you say, but this doesn’t solve the issue. This is
because when you run a command like:

svn propset svn:ignore ‘*’ doc

… the actual property itself is stored in the “.svn” directory of the
target directory (“doc/.svn” in this case). So, this will work as long
as that .svn directory remains intact. However, the rdoc tasks (i.e.
“rake rdoc” and “rake rerdoc”) both clobber everything in the target
directory when they run, including the “.svn” directory. So, if the
rdoc task is ever run, you’ll have to go through the whole song and
dance of setting the ignore property, etc again. Perhaps I’m missing
something in your solution? I’ve searched all over the web for a
solution to this, but all I’ve found so far is what you’re suggesting
here. I’m on OS X Leopard with ruby 1.8.6 if it makes a difference.

I solved my own problem. I had tried both the above mentioned command
as well as setting the ignore property from the root directory earlier.
I don’t know what I did differently now, but the following worked for
me:

  • Get rid of the rdoc output directory (“doc” in my case)
  • Run “mkdir doc” to get a fresh directory
  • Run “svn propset svn:ignore ‘doc’ .” (note the period!) to ignore
    the entire “doc” directory

Why this didn’t work for me before, I don’t know. Hopefully this helps
somebody out. :slight_smile:

– Ben

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs