cadams
cadams

Reputation: 1415

Directory in repository changed name, and then changed back - svn no longer recognizes working copy directory as the same location

I work collaboratively on a lot of code, and a few days ago a collaborator changed the name of a directory within a repository. Realizing this, I asked the person if they could change the name back to its original name, so as to avoid a complex resolution with svn (my working copy had several changes that had not yet been committed, that I wanted to preserve). The collaborator changed the directory name back to what it had been, but now, an svn status -u call tells me the directory in my working copy is no longer recognized as the same as the one in the repository. It also warns > local dir edit, incoming dir delete upon update

Here is a simplified description of what happened:

Initially:

WC: /main/path/script/...
Repo: /main/path/script/...

Then:

WC: /main/path/script/...
Repo: /main/path/python_scripts/...

Finally:

WC: /main/path/script/...
Repo: /main/path/script/...

Where the last one claims that these two locations are not the same any more.

Can someone explain to me how I can sync these two paths again without committing my current working copy to the repository? Please note that I am not well-versed in the svn work-cycle, so a detailed explanation would be greatly appreciated.

Upvotes: 0

Views: 167

Answers (1)

0xdb
0xdb

Reputation: 3707

It seems like you issued update after first renaming of your script directory in the repository and then renamed it back. Now your directory remains in an unresolved conflict state. Try to resolve it like:

cd /main/path/script/
cp -pR . ../script.bak # !!!do not forget perform backup!!!

svn resolve
Tree conflict on '.'
   > local dir add, incoming dir add upon update
Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r
Resolved conflicted state of '.'

Now you can see, than your local directory was replaced. Probably you want commit this change only:

svn stat -qu --depth=empty
R  +             -   .

svn ci --depth=empty -m"renaming was resolved"
Replacing      .
svn: The depth of this commit is 'empty', but copies are always performed recursively in the repository.

Committed revision 6532.

Afterward all your files should remain intact.

Upvotes: 1

Related Questions