diff --git a/base/deprecated.jl b/base/deprecated.jl index 16b52edc25343..e7ce28e4e6e3d 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -18,13 +18,13 @@ # the name of the function, which is used to ensure that the deprecation warning # is only printed the first time for each call place. -macro deprecate(old,new) +macro deprecate(old,new,ex=true) meta = Expr(:meta, :noinline) if isa(old,Symbol) oldname = Expr(:quote,old) newname = Expr(:quote,new) Expr(:toplevel, - Expr(:export,esc(old)), + ex ? Expr(:export,esc(old)) : nothing, :(function $(esc(old))(args...) $meta depwarn(string($oldname," is deprecated, use ",$newname," instead."), @@ -1765,11 +1765,11 @@ end # limit use of LibGit2.get method (part of #19839) eval(Base.LibGit2, quote - @deprecate get{T<:GitObject}(::Type{T}, repo::GitRepo, x) T(repo, x) - @deprecate get{T<:GitObject}(::Type{T}, repo::GitRepo, oid::GitHash, oid_size::Int) T(repo, GitShortHash(oid, oid_size)) - @deprecate revparse(repo::GitRepo, objname::AbstractString) GitObject(repo, objname) - @deprecate object(repo::GitRepo, te::GitTreeEntry) GitObject(repo, te) - @deprecate commit(ann::GitAnnotated) GitHash(ann) + @deprecate get{T<:GitObject}(::Type{T}, repo::GitRepo, x) T(repo, x) false + @deprecate get{T<:GitObject}(::Type{T}, repo::GitRepo, oid::GitHash, oid_size::Int) T(repo, GitShortHash(oid, oid_size)) false + @deprecate revparse(repo::GitRepo, objname::AbstractString) GitObject(repo, objname) false + @deprecate object(repo::GitRepo, te::GitTreeEntry) GitObject(repo, te) false + @deprecate commit(ann::GitAnnotated) GitHash(ann) false end) # End deprecations scheduled for 0.6