<div class="gmail_quote">On Tue, Sep 13, 2011 at 12:09 PM, Lassi Tuura <span dir="ltr"><<a href="mailto:lat@cern.ch">lat@cern.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Whether it's a bug, could anyone suggest an alternative rule set which would allow us to achieve our goal here so we can work with 3.0.x rsync?<br></blockquote><div><br></div><div>The problem is your use of --delete-excluded, which is an old option from the days prior to filter files.  The way that --delete-excluded is implemented, it adds an 's' (sender-side) modifier to all the include/exclude/filter options that you specify on the command-line (unless the command-line filter option has an explicit side specified).  Thus --exclude=foo turns into --filter='-s foo' and --exclude-from=FILE turns into a (relaxed-prefix) --filter="merge,s FILE" rule.  In 3.0.x, the filter code treats the specifying of a protect rule inside a server-side rule file as though the receiver-side option gets added to the server-side option, turning it into a normal exclude (i.e. "P foo", aka "-r foo" turns into "-sr foo").  In the 3.1.0dev code, your test case errors out with a rule conflict (the specifying of a receiver-side rule inside a sender-side rule file).  Specifying the "-r /x/***" rule on the command-line isn't considered a conflict, since it never gets the implied 's' modifier added to it.</div>
<div><br></div><div>For the future, I'm thinking that it would probably be better to just allow the specified-side rule to override an specified-side merge rule, which would make the merge,s setting just a default to create sender-side rules rather than it requiring all the rules therein to not specify a side.  However, care needs to be taken to ensure that the side optimizations (and per-dir merge files) are all handled correctly.</div>
<div><br></div><div>Your best bet for the meantime is to not mix --delete-excluded with side-specifying filter rules, and just specify your hide rules directly -- i.e. replace --exclude-from=FILE with --filter=".s FILE" (though every exclude line would need to have a "- " prefix) or --filter=".-s FILE" (though every line would need to NOT have a +/- prefix), etc.</div>
<div><br></div></div>..wayne..<br>