How do you overcome the svn 'out of date' error?

前端 未结 30 2086
鱼传尺愫
鱼传尺愫 2020-12-12 08:51

I\'ve been attempting move a directory structure from one location to another in Subversion, but I get an Item \'*\' is out of date commit error.

I ha

相关标签:
30条回答
  • 2020-12-12 09:21

    There is at least one other cause of the message "out of date" error. In my case the problem was .svn/dir-props which was created by running "svn propset svn:ignore -F .gitignore ." for the first time. Deleting .svn/dir-props seems like a bad idea and can cause other errors, so it may be best to use "svn propdel" to clean up the errant "svn propset".

    # Normal state, works fine.
    > svn commit -m"bump"  
    Sending        eac_cpf.xsl
    Transmitting file data .
    Committed revision 509.
    
    # Set a property, but forget to commit.
    > svn propset svn:ignore -F .gitignore .
    property 'svn:ignore' set on '.'
    
    # Edit a file. Should have committed before the edit.
    > svn commit -m"bump"                   
    Sending        .
    svn: Commit failed (details follow):
    svn: File or directory '.' is out of date; try updating
    svn: resource out of date; try updating
    
    # Delete the property.
    > svn propdel svn:ignore .              
    property 'svn:ignore' deleted from '.'.
    
    # Now the commit works fine.
    > svn commit -m"bump"     
    Sending        eac_cpf.xsl
    Transmitting file data .
    Committed revision 510.
    
    0 讨论(0)
  • 2020-12-12 09:24

    In my case only deleting of the local version and re checkout of fresh copy was a solution.

    0 讨论(0)
  • 2020-12-12 09:27

    After trying all the obvious things, and some of the other suggestions here, with no luck whatsoever, a Google search led to this link (link not working anymore) - Subversion says: Your file or directory is probably out-of-date

    In a nutshell, the trick is to go to the .svn directory (in the directory that contains the offending file), and delete the "all-wcprops" file.

    Worked for me when nothing else did.

    0 讨论(0)
  • 2020-12-12 09:27

    Are you moving it using svn mv, or just mv? I think using just mv may cause this issue.

    0 讨论(0)
  • 2020-12-12 09:28

    I've found that this works for me:

    svn update
    svn resolved <dir>
    svn commit
    
    0 讨论(0)
  • 2020-12-12 09:28

    I moved the dir to my local machine for safe-keeping, then svn deleted the stupid directory, then committed. When I tried to add the folder from my local machine it STILL threw the error (SVN move did the same thing when I tried to rename the folder). So I reverted, then I did a mkdir DIRNAME, added, and committed. Then I added the contents in and committed, and it worked.

    0 讨论(0)
提交回复
热议问题