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
Git clone issue. #1519
Comments
What about that filename is incompatible with Windows? Too long? Invalid character? |
I can't look into it now, but my first guess would be a conflict with another filename where the filenames are only distinguished by case. Windows and Mac OS X HFS+ are not case-sensitive. |
Sounds like a possible same issue to what I was seeing: |
hmm, surprised that this issue is still present, i had to create a 3rd folder as i CANNOT PULL git.exe clone --progress -v "git://github.com/ginatrapani/ThinkUp.git" "S:_incoming\Internet\Twitter\ThinkUp3\ThinkUp" Cloning into 'S:_incoming\Internet\Twitter\ThinkUp3\ThinkUp'... Success (17222 ms @ 09/05/2013 14:07:23) |
What do we have to change about those files to make them compatible? Once we know for sure, we can fix. |
Replicated this on a fresh The commas ( Looks like the filename and folder lengths are too long. By the time you get to the file you stop here: application_rate_limit_status.json-resources=account,statuses,users,followers,lists,friends,favorites,friendships,application,sear That's "ch" left off. Too long and/or too deep. |
This is 240 characters long: webapp/plugins/twitter/tests/testdata/testofcrawlertwitterapiaccessoroauth/testinitializeendpointratelimits/application_rate_limit_status.json-resources=account,statuses,users,followers,lists,friends,favorites,friendships,application,search What is Windows Vista's limit? If you store the files in a very short base foldername, like c:\tu, does that make a difference? @jacktandy, which version of Windows specifically are you using? What is the folder/filename length limit? |
On Vista, tested with this filename of 254 characters under a path of w:\z (single letter): 01234567890123456789012345678901234567890123456789012345678901234567890123456789 The above only formatted here with breaklines to prevent scrolling. |
@ginatrapani Windows 7, 64 bit. To recreate, simply create the same directory path i.e. not sure what length limits are these days, sure you can find that out, but the filenames in question could be considered questionably long anyway ;-) |
I can't personally repro because I don't have Win7 but if someone can
|
Gina, It looks like two offending files (at least for me) are in this directory: That directory plus filename is approx 240 characters, and it appears that Windows 7 (even 64-bit) has a 256 character limit (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx), so if someone has his or her git repo in a location that has over 16 characters, there will be problems. My repo, for example, is at: ... which is causing problems because that path is 258 characters. I tested shortening the path to C:\g\ThinkUp\webapp..... and the problems went away for me, so I do believe the 256-character limit is the issue. tl;dr - we need to shorten the path lengths for the twitter test data Thanks!! |
How about we advise Windows-based developers to use folder names under 16 characters in our documentation? |
Adds note in docs under "Set Up Your Environment" that long filepaths will be troublesome if working on Windows platform. Also fixes up some formatting of other points and italicises paths for menu actions to help visually stand out from rest of text. Updates a couple of URLs that have since 301 to new places. Related to ThinkUpLLC#1519
Hmm, it's your project to do as you see fit, however, in my opinion this is a terrible work-around, albeit better than nothing, and definitely the only one of many projects from svn/git or bazaar repos that has this filename issue. To pass the responsibility to the installer instead of addressing the issue properly by reducing the filename length is may i say poor. Also, I am not even talking about the install stage, simply cloning the repo to a folder greater than 16 chars is all that is required to raise this issue. Does... and... really add value as file names on any OS? The longest name here is 133 chars, leaving 16 to win, how about renaming it to 16 so win has 133 chars? Perhaps, i'm missing something, is the resistance to rename due to the file name (and this would be shocking) being used as parameters to a function. Please reconsider, much preferable are shorter meaningful file names that can be neatly organized in sub folders rather than the ancient 1990s practice of things requiring to be placed at drive root (as per the docs suggestion) yuk! Thanks |
@jacktandy each of those files represents the payload of an API call which developers use to write automated tests for code which make those calls to actual URLs when the app is running. The filenames look odd because they map simply and clearly to URLs with specific parameters defined by third-party APIs, in this case Twitter's. Shortening them would add yet another level of mapping that developers would have to decode while they write tests. My job is to make writing tests easier, not more difficult, hence the more verbose/clear filenames. The files lengths are well within Windows' 256-character limit. We're not asking devs to store the files at the root, just within a 16-character folder name. I realize that is short. What do you suggest ThinkUp's max file length should be? 200? 225? |
Tricky to say without looking at relevant use code, perhaps create stubs... and if this doesn't fit, and in all honesty, the mapping should be refactored. File names should never be used as function parameters for all manner of reasons e.g. scalability. |
Digging into this a bit more, I recall that we do (attempt) to enforce a 200-character file length for mock test data. See https://github.com/ginatrapani/ThinkUp/blob/master/tests/classes/class.ThinkUpBasicUnitTestCase.php#L234 for the code which is supposed to do that. Turns out the command is only checking the filename, not the path AND the filename, so these files got in past it. I'm working on a fix for both the command and shortening the folder names so that Windows devs will have to stay under a 56-character limit pathwise, which seems more reasonable than 16. |
Shorten existing filenames over 200 characters for Windows users Closes #1519
On Windows your path must be less than 56 characters long, not 16 (see update to #1519). Not short enough to warrant extra note.
@ginatrapani Yup, a 56 char limit is a far better proposition than 16. Thanks for sorting this. I can confirm thinkapp now clones without issue into a "reasonable" path on windows where in my use case, the base path cloned into is... X:_incoming\Internet\Twitter\ThinkUp\ A virtual chocolate muffin and a high five to Gina. |
Initial clone under windows...
git.exe clone --progress -v "git://github.com/ginatrapani/ThinkUp.git" "S:_incoming\Internet\Twitter\ThinkUp2"
Cloning into 'S:_incoming\Internet\Twitter\ThinkUp2'...
Receiving objects: 100% (28807/28807), 17.53 MiB | 1.00 MiB/s
Resolving deltas: 100% (21685/21685)
remote: Compressing objects: 100% (9075/9075)
remote: Compressing objects: 100% (9075/9075), done.
remote: Total 28807 (delta 21685), reused 26026 (delta 19341)
error: unable to create file webapp/plugins/twitter/tests/testdata/testofcrawlertwitterapiaccessoroauth/testinitializeendpointratelimits/application_rate_limit_status.json-resources=account,statuses,users,followers,lists,friends,favorites,friendships,application (No such file or directory)
Success (53774 ms @ 26/03/2013 18:54:39)
Even though "success", a random subsequent pull will fall over.
The text was updated successfully, but these errors were encountered: