Re: [PATCH] git-svn: make git svn --version work again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> wrote:
> by requesting SVN::Core which is needed for the svn version.
> 
> Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>

Thanks Michael, pushed out to git://git.bogomips.org/git-svn along with the
crlf fixes by Erik.

> ---
> In fact, there are a few more places where seemingly a req_svn() is missing.
> But the call chains are very confusing. The one seemingly missing in prop_walk()
> would be covered by the recursive props test which succeeds, so the caller
> must have requested SVN::Core also. I believe this applies to the other places
> as well (but not to version()).
> 
> Is there any harm done by inserting a superfluous req_svn() in these cases for
> good measure?

There should be no harm anywhere SVN::* is needed, Perl won't attempt to
re-require something that's already required.

The primary benefactor of having an explicit req_svn() function is the
no-op case of rebase on certain setups:

commit d32fad2b89c81ca29128722e0e2f5985426e5e7a
Author: josh robb <josh_robb@xxxxxxxxxxx>
Date:   Wed Feb 24 16:13:50 2010 +1300

    git svn: delay importing SVN::Base until it is needed
    
    Importing functions from a .dll into Git for Windows' perl is pretty slow,
    so let's avoid importing if it is not necessary.
    
    This seems particularly slow in virtualized enviroments. Before this
    change (on my machine):
    
    $ time perl /libexec/git-core/git-svn rebase
    Current branch master is up to date.
    
    real 2m56.750s
    user 0m3.129s
    sys 2m39.232s
    
    Afterwards:
    
    $ time perl /libexec/git-core/git-svn rebase
    Current branch master is up to date.
    
    real 0m33.407s
    user 0m1.409s
    sys 0m23.054s
    
    git svn rebase -n goes from 3m7.046s to 0m10.312s.
    
    Signed-off-by: Josh Robb <josh_robb@xxxxxxxxxxx>
    Acked-by: Eric Wong <normalperson@xxxxxxxx>

-- 
Eric Wong
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]