• Steve McIntyre's avatar
    Cope with being called from directories other than the webwml root · 4ec44f54
    Steve McIntyre authored
    Added extra directory handling code to allow for this where it makes
    sense. This should now work for all public APIs, except:
    
     * cache_file()
     * cache_repo()
     * path_info()
     * get_topdir()
    
    The first two are almost internal anyway, and the last doesn't take
    any arguments to allow for anything to work *except* when the caller
    is somewhere within the webwml repo. path_info() is *hard* to change
    here, and all the callers I can find are already expecting to be in
    webwml anyway. I've added checks in each of these to at least complain
    clearly when expectations are not met.
    
    These changes might slow things down slightly due to repeated chdir()
    calls, but meh.
    
    Also added some extra tests for this in the vcs-test.pl script.
    4ec44f54
vcs-test.pl 10.3 KB