CodeMod apache::thrift::transport::TSocketAddress to folly::SocketAddress.
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 12 Aug 2015 20:29:16 +0000 (13:29 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Wed, 12 Aug 2015 21:20:37 +0000 (14:20 -0700)
commitaa6e8869f59cab90bae4e3be69619d6c2ce1b3e7
tree903642e848d8e5840eb65ff67d5de198b52090b2
parentabb1acc6ba94cac1f50377e925135afcc718d0ed
CodeMod apache::thrift::transport::TSocketAddress to folly::SocketAddress.

Summary: [Folly] CodeMod apache::thrift::transport::TSocketAddress to folly::SocketAddress.

    yes | codemod --extensions h,tcc,cpp '^#include [<"]thrift/lib/cpp/transport/TSocketAddress\.h[>"]$' '#include <folly/SocketAddress.h>'
    yes | codemod --extensions h,tcc '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'folly::SocketAddress'
    yes | codemod --extensions cpp '^using apache::thrift::transport::TSocketAddress;$' 'using folly::SocketAddress;'
    yes | codemod --file-list "$(git ls-files "**/*.cpp" | xargs grep -P '^using (namespace folly|folly::SocketAddress);$' | cut -d: -f1 | paste -s -d,)" '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'SocketAddress'
    yes | codemod --extensions cpp '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'folly::SocketAddress'
    yes | codemod --extensions h,tcc,cpp -m '^\s*typedef folly::SocketAddress folly::SocketAddress;\n' ''
    yes | codemod --file-list thrift/lib/cpp/Makefile.am -m '^\s*transport/TSocketAddress\.h \\\n' ''
    rm thrift/lib/cpp/transport/TSocketAddress.h

Reviewed By: @Invalid auth token., @​luk

Differential Revision: D2325523
folly/SocketAddress.h
folly/io/async/AsyncServerSocket.h