Mike --

If you're going to change the behavior, please also change the comment.



> On Feb 8, 2015, at 10:11 AM, git...@crest.iu.edu wrote:
> 
> This is an automated email from the git hooks/post-receive script. It was
> generated because a ref change was pushed to the repository containing
> the project "open-mpi/mtt".
> 
> The branch, master has been updated
>       via  f846c3c2bb57155c2123f8ea4fc6b608a2c37655 (commit)
>      from  97b8fae04192bcb6732bc473664b1d0828c481f8 (commit)
> 
> Those revisions listed above that are new to this repository have
> not appeared on any other notification email; so we list those
> revisions in full, below.
> 
> - Log -----------------------------------------------------------------
> https://github.com/open-mpi/mtt/commit/f846c3c2bb57155c2123f8ea4fc6b608a2c37655
> 
> commit f846c3c2bb57155c2123f8ea4fc6b608a2c37655
> Author: Mike Dubman <mi...@mellanox.com>
> Date:   Sun Feb 8 17:09:54 2015 +0200
> 
>    fix: allow use of relative mtt.ini path from -f /path/to/mtt.ini location
> 
>    current behave is to look for include file only in the same dir as 
> supplied mtt.ini file
>    allow use relative path from supplied mxm.ini location
> 
> diff --git a/lib/MTT/INI.pm b/lib/MTT/INI.pm
> index 915535d..7a1f129 100644
> --- a/lib/MTT/INI.pm
> +++ b/lib/MTT/INI.pm
> @@ -389,7 +389,11 @@ sub _expand_include_files {
>             # If an absolute path is not used, then the file is assumed to be
>             # relative to the main --file|f option
>             if ($file !~ /^\s*\//) {
> -                $file = "$dirname/" . basename($file);
> +                if (-f "$dirname/$file") {
> +                    $file = "$dirname/$file";
> +                } else {
> +                    $file = "$dirname/" . basename($file);
> +                }
>             }
> 
>             if (! -r $file) {
> 
> 
> -----------------------------------------------------------------------
> 
> Summary of changes:
> lib/MTT/INI.pm | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> 
> 
> hooks/post-receive
> -- 
> open-mpi/mtt
> _______________________________________________
> mtt-commits mailing list
> mtt-comm...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/mtt-commits


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

Reply via email to