svn - Replacing directory with external results in "working copy locked" on `update` -


(related to: svn externals repo "is locked" on update)

i started off repository structure this:

^/ ├ module1/ │ ├ foo/ │ ├ bar/ │ ├ baz/ ├ module2/ 

the directory ^/bar antiquated copy of module2, , decided better external modern version, instead of byte-wise copy:

^/ ├ module1/ │ │ (external: "^/module2 bar") │ ├ foo/ │ ├ baz/ ├ module2/ 

setting went smoothly:

svn co svn://module1 module1 cd module1 svn delete bar svn propset svn:externals "^/module2 bar" . 

now want update working directory can perform build & test new code before committing.

however, svn update result in following error:

fetching external item 'module1/bar' svn: warning: working copy 'module1/bar' locked 

i tried svn cleanup in each directory, subsequent update still failed same error.

is because i'm trying replace directory external same name, in same commit? want possible?

i using svn 1.8.

yes, cause. directory being locked deletion @ same time external's contents trying spawn @ same location.

you can working directory committable state updating without externals:

svn update --ignore-externals 

that prevents incoming bar external conflicting outgoing directory. however, of course, means external's contents won't present. able commit now, you'll potentially stuck broken revision in svn rest of time because cannot build & test first.

there hacky way around not ideal @ least give idea of whether new code working. involves moving folders around in working directory:

svn propset svn:externals "^/module2 bar_tmp" . svn update rm -rf bar mv bar_tmp bar 

now can build & test reasonable guarantee you're testing committing, although unorthodox.

your working directory structure this:

~/ ├ module1/ │ ├ foo/ │ ├ bar/    (external "^/module2") │ ├ baz/ 

don't svn update! you've [deliberately] butchered working directory extent , less svn knows better. don't need svn build & test.

when you're done , happy, though, need put things way were:

svn propset svn:externals "^/module2 bar" . rm -rf bar svn update --ignore-externals 

and commit.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -