RDocTask and SVN

Discussion in 'Ruby' started by Raymond O'connor, Feb 15, 2007.

  1. 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

    --
    Posted via http://www.ruby-forum.com/.
    Raymond O'connor, Feb 15, 2007
    #1
    1. Advertising

  2. 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
    Ben Bleything, Feb 15, 2007
    #2
    1. Advertising

  3. Raymond O'connor

    Eric Hodel Guest

    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"
    Eric Hodel, Feb 16, 2007
    #3
  4. Raymond O'connor

    Ben Oakes Guest

    Ben Bleything 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.
    --
    Posted via http://www.ruby-forum.com/.
    Ben Oakes, Dec 26, 2007
    #4
  5. Raymond O'connor

    Ben Oakes Guest

    Ben Oakes wrote:
    > Ben Bleything 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. :)

    -- Ben
    --
    Posted via http://www.ruby-forum.com/.
    Ben Oakes, Dec 27, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ng Pheng Siong

    [ANN] M2Crypto SVN and Bugzilla

    Ng Pheng Siong, Jul 31, 2004, in forum: Python
    Replies:
    0
    Views:
    281
    Ng Pheng Siong
    Jul 31, 2004
  2. James Stroud

    Using SVN with Python and .pyc files

    James Stroud, Oct 13, 2006, in forum: Python
    Replies:
    4
    Views:
    261
    James Stroud
    Oct 13, 2006
  3. percious

    SVN and Setuptools

    percious, Oct 10, 2007, in forum: Python
    Replies:
    0
    Views:
    258
    percious
    Oct 10, 2007
  4. Takashi & Kayoko Sano

    Rake RDocTask fails on Win XP

    Takashi & Kayoko Sano, Oct 9, 2004, in forum: Ruby
    Replies:
    0
    Views:
    122
    Takashi & Kayoko Sano
    Oct 9, 2004
  5. Pablo Yanez
    Replies:
    0
    Views:
    98
    Pablo Yanez
    May 2, 2011
Loading...

Share This Page