-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clone_extra_repos.py fails on Windows #98
Comments
I know what the problem is. The problem is that I will go ahead and make this change. @lefebvre, What repo are you pulling TriBITS from? |
For this new project I am working on I have a fork of TriBITSPub/TriBITS. |
Okay, then I will push the the Github 'master' branch first. Then you can just merge from this main TriBITS 'master' branch to your fork. If you are making changes to TriBITS, let's try to get then back into the main version so they can be maintained long term. For that, take note of Contributing to TriBITS. |
The clone_extra_repos.py script imports the gitdist.py module to get some of its functionality. On windows this fails because gitdist.py was just a symlink to gitdist. So, to support Windows, I just made the real file gitdist.py and the symlink is now gitdist. This should not impact Linux usage at all. And if you copy/install gitdist into another location, it will follow the symlink and copy the file in its entirety. With this change, on Windows, if you want to use gitdist, you will need to use gitdist.py. Fixes #9
Jordan, Please merge the updated 'master' branch (which I forced pushed to fix the GitHub Issue ID) into your fork and see if that does the trick. Please give the results one way or the other so that I can confirm. |
Ross,
|
@lefebvre, can you provide more info on the context for this so I can try to reproduce? |
Ross,
My guess is that you are just expecting the array structure. |
The clone_extra_repos.py script has not been tested with Hg repos. It would need to be extended for Hg repos. You can look at the automated tests for clone_extra_repos.py in the file:
It should be much easier to add Hg support to the clone_extra_repos.py script than say the checkin-test.py script. |
Ross,
|
…latform agnostic splitlines().
That change seems to work fine with python 2.6.6. That is what we have on the CASL machines. That is good enough for me. I will go ahead and push this to the main TriBITS GitHub 'master' branch. |
Ross, |
It looks like splitlines() is not supported with Python 2.4.4 as shown here but is listed as supported in Python 2.6.9 as shown here. So, with this change, we loose backward compatibility to Python 2.4. As recently as 3/3/2015, there was an old Trilinos test machine that was running Python 2.4.3. But it looks like the remaining test machines are all 2.6.6 and above. I am replacing all usages of split("\n") with splitlines() and upgrading the min version of Python required for the TriBITS python code from 2.4 to 2.6. I just know that some Trilinos developer is going to complain but Python 2.6.6 is an old version of Python released way back in 2010 (see here). |
I am replacing those too.
That is what I am in the process of doing. Amazingly, there is slightly different behavior between split("\n") and splitlines(). I am having to fix up some code to get the tests to pass again. |
Looks like split("\n") returns an empty array element at the end while splitlines() does not. That is good, except I wrote the code to expect an empty element at the end. Now I am fixing that. |
Devil in the details... |
Changed from split("\n") to splitlines() to deal with newlines in MS Windows. Jordan reports that this fixes a problem on MS Windows with the clone_extra_repos.py script. This also seems to be supported with Python 2.6.6 (which is what is running on the current machine). This means that the min version of Python required for TriBITS python support is now Python 2.6.6. It actually took a good bit of work to adjust everything for this change as split("\n") will always return an empty element at the end while splitlines() will not. It was tricky updating all of the code and tests due this simple change.
Now that the TriBITS python code is using splitlines() which is not supported in Python 2.4, I have upgraded the min Python version to 2.6. Hopefully there are not still machines running Python 2.4. According to: https://www.python.org/doc/versions/ Python 2.6.1 was first released way back in Dec. 2008. I don't know of any other moderately recent machines that don't run 2.6.6 or above. Build/Test Cases Summary Enabled Packages: TriBITS Enabled all Forward Packages 0) MPI_DEBUG => passed: passed=199,notpassed=0 (0.93 min) 1) SERIAL_RELEASE => passed: passed=199,notpassed=0 (0.78 min) Other local commits for this build/test group: 2ce3206
@lefebvre, I just pushed the commits. Let me know if that solves the problem or not so that I can close this Issue. |
Windows works. Thanks. |
clone_extra_repos.py fails attempting to import gitdist.
The text was updated successfully, but these errors were encountered: