merge from trac:r12620
merge from trac:r12654
merge from trac:r12720
merge from trac:r12774
merge from trac:r12972
merge from trac:r12974
merge from trac:r13068