Importing a tree from a special remote when it has a preferred content configured currently only works when the expression does not use any terms that operate on keys. (Eg things like copies=).
e06feb7316af35b1277b7159a74c216c8f2e7422 implemented that. Could it be extended to also support using it with an expression that does operate on keys?
This would probably entail making any term of the expression that needs a key evaluate to true. Then it would import all files (that match also terms that don't need a key). After the import, it may turn out that the special remote doesn't want to contain particular content that was imported from it, and it would make sense that an export to the special remote would remove those files. --Joey
Hmm, consider for example a camera. If the user wants to import all jpeg files from it, and not export to it jpeg files that have a copy in an archive, they might use:
But on import, if "copies=archive:1" were made to evaluate to true as suggested here, then this expression would not match, and so nothing would be imported.
Seems that the approach needs to be instead to traverse the expression and prune terms that operate on keys. So convert the example above to "include=*.jpeg".
How to prune in some other cases: