## What steps will reproduce the problem?

    ~$ git annex webapp


* Add Another Local Repository (~/Direct) "Direct", keep separate (from existing repo) no repo type
* Add Repository, ~/Indirect "Indirect", combine (with Direct) , repo type client
* Syncing enabled on both

Then

    ~/Indirect$ git annex indirect
    commit  ok
    indirect  ok
    ok
    ~/Indirect$ touch ../Direct/Test.File
    

## What is the expected output? What do you see instead?

That ~/Indirect/Test.File be a symlink into .git/annex/objects/.......

Instead, it is not a symlink. However, doing

    ~/Indirect$ git annex direct
    ~/Indirect$ git annex indirect

results in what I would expect (until the content of Direct/Test.File is changed, when it ceases to be a symlink in ~/Indirect once more)



## What version of git-annex are you using? On what operating system?
git-annex version: 4.20130405

Ubuntu 12.10


## Please provide any additional information below.

Reading [[direct_mode]], I thought that I could have two repos on my computer, one direct, and one indirect, and if running the assistant, that I could gain the security of retaining old versions, as well as the convenience of direct mode. (I think I understand that correctly; if a direct-mode file only exists in one repository, and is edited, the old version is lost, but if it is in multiple repos, then the old versions will be retained).

It seems to me that if I do

    ~/Direct$ echo Content > Test.File
    ~/Direct$ echo More Content > Test.File
    ~/Direct$ echo Even More Content > Test.File

that all three copies are stored in ~/Indirect, so the functionality I'm after seems to work. However, ~/Indirect/Test.File ends up not being a symlink, which I think is odd/unexpected.


**Edit:  Doing a git annex sync in ~/Indirect results in the continuing behaviour to be correct, so there's some issue telling Direct that Indirect is no longer in direct-mode?**
This appears to fix it, but I guess shouldn't be necessary.

> AFAICS, the entire problem is that the assistant does not notice when the
> repository it's running in is changed from direct to indirect mode. Since this
> has also been reported to cause problems with the assistant, I have added
> a check to prevent it from being done. [[done]] --[[Joey]] 
