robhagemans / pcbasic

PC-BASIC - A free, cross-platform emulator for the GW-BASIC family of interpreters
http://www.pc-basic.org
Other
396 stars 48 forks source link

Cannot pull the test-new folder #75

Closed Danitegue closed 6 years ago

Danitegue commented 6 years ago

Hi Rob.

I'm implementing your latest commit into the brewer fork.

I cannot pull your latest master commit due the dottest. and dottest.. folders, I think there should be due to not allowed folder names in windows.

Do you know any solution for that, or should we ignore these folders for now?

Git aborts the pull action when it happen.

image

Danitegue commented 6 years ago

I have deleted all the folder, and done a new clone of your master repository again,

git clone --recursive https://github.com/robhagemans/pcbasic.git

it is indicated that the clone could be done, but the checkout failed.

C:\PCBRW>git clone --recursive https://github.com/robhagemans/pcbasic.git Cloning into 'pcbasic'... remote: Counting objects: 39683, done. remote: Compressing objects: 100% (572/572), done. remote: Total 39683 (delta 582), reused 854 (delta 453), pack-reused 38625 Receiving objects: 100% (39683/39683), 14.23 MiB | 258.00 KiB/s, done. Resolving deltas: 100% (27602/27602), done. error: unable to create file test/test-new/test-filenames/dottest../text: No such file or directory fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'

I manually did the git chechout -f HEAD for every file in what was needed, except for the test directory.

Then, I have tested it with the brewer program. It is able to load the program, but in the first CHAIN MERGE, it breaks. Here you can see that the values of the C$ and E$ variables are lost.

image

here the basic code in which fails, (main.asc file)

100 DN%=8:DD$="\bdata\":CT$(0)="E  ":CT$(1)="I  "
110 E$=".rtn":READ PC$
120 ON ERROR GOTO 0
130 REM init
140 C$="init":GOSUB 6000:CHAIN MERGE C$+E$,150,ALL,DELETE 10000-65529
150 READ PC$:GOSUB 10000
180 NO$="-1":GOSUB 5300:REM program dir

I have noticed that after a FILES command, pcbasic is showing all the C:\ unit files, instead of the Z:\ ones.

Attached the launcher I'm using with your master version. Launcher185_375_pcbasic_rh_nobrew.zip

robhagemans commented 6 years ago

The issue with the dot filenames on Windows is just annoying - however you don't need this directory at all.

The strings are deleted by the CHAIN call, even though it raises an error. I think this is actually in line with GW-BASIC.

There were some changes to the default drive settings to make them less confusing for Windows users - you probably need to add --mount=Z:. --current-device=Z to the command line options to get the old behaviour

Danitegue commented 6 years ago

Ok, I have added these --mount=Z:. --current-device=Z arguments to the launcher, and is working fine now, also the com port communications. The fact of having a current device changed, depending of the launcher location is useful, but a bit confusing sometimes.

Respect the git problem, I would say to add the test-filenames folder into the gitignore, or to explain in the development.md that this clone error can happen in windows, and it is necessary to do the checkout of some files after git aborts the action. Otherwise the instructions would not be valid, for windows users.

Thanks for all!

robhagemans commented 6 years ago

The main reason for changing the mount defaults is that the existing situation seemed to be confusing on Windows - I've had to answer the question "where are my files?" literally dozens of times as the concept of mounting a filesystem or using the command line seems alien to Windows users. So now the default (if no --mount is given) is to just mirror all Windows drive letters, even if that's potentially a bit less safe, and use the same current drive. I'll see if there's improvement possible in the default for the current drive when --mount is given.

As to the clone error, thanks for reporting it and I'll fix it at some point. From checking Stackoverflow it seems I will have to remove the test simply because Windows cannot deal with some characters in filenames that are legal under POSIX.

Danitegue commented 6 years ago

Thanks for checking it.

The proposal to fix the git clone problems was only to save you of people asking the same several times, more than facilitate the life to the windows testers.

I can skip the problematic folders in the clone, no problem.

El sáb., 30 jun. 2018 a las 11:59, Rob Hagemans (notifications@github.com) escribió:

The main reason for changing the mount defaults is that the existing situation seemed to be confusing on Windows - I've had to answer the question "where are my files?" literally dozens of times as the concept of mounting a filesystem or using the command line seems alien to Windows users. So now the default (if no --mount is given) is to just mirror all Windows drive letters, even if that's potentially a bit less safe, and use the same current drive. I'll see if there's improvement possible in the default for the current drive when --mount is given.

As to the clone error, thanks for reporting it and I'll fix it at some point. From checking Stackoverflow it seems I will have to remove the test simply because Windows cannot deal with some characters in filenames that are legal under POSIX.

DEVELOPMENT.md gives some tips and pointers but I don't think there should be an expectation that it is complete or "valid", people should really expect to sometimes have to figure things out for themselves. Sorry if that sounds a bit stroppy but I've recently had some bruising experiences with Windows users' (not you) sense of entitlement to "ease of use" and detailed support. Which is particularly grating given the huge amount of time and special code needed to deal with all the areas in which Windows fails to follow the conventions accepted on every single other operating system known to humanity since the 1970s...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/robhagemans/pcbasic/issues/75#issuecomment-401536635, or mute the thread https://github.com/notifications/unsubscribe-auth/AYutGBcg52psQIh4nHPY8SYsL5jAp2XXks5uB2gagaJpZM4U34MJ .

--

Daniel Santana Díaz, Danitegue@gmail.com