neo618 / tortoisesvn

Automatically exported from code.google.com/p/tortoisesvn
0 stars 0 forks source link

Windows Case-Sensitive FileName Creation using FILE_FLAG_POSIX_SEMANTICS #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am looking to add case sensitivity to TortoiseSVN.  I am a developer
looking to make a patch myself, unless it is found easier for someone else
to do this before I get the chance to.

Right now, I am having troubles getting it to compile using Visual Studio
2008 Pro w/ SP1.

But once I get through that trouble (and separate issue, if it comes down
to it), I would like to find what TortioseSVN is using to make new files
(CreateFile(), Windows API, for example) when checking out a new project.  

If it is using the STL to make files, then I assume I will need to look
into getting support into that for using FILE_FLAG_POSIX_SEMANTICS on file
creation.

Otherwise, if TortioseSVN does happen to be using the Windows API
CreateFile() directly, I would like to know where that is at in the project
(I have been searching, but only two days into learning this project).

Below is a two second program which creates two files of the same name, but
different case sensitivity (to prove that any version of windows nt
supports it).

[code]
// Don't include bloated MFC junk.
#define WIN32_LEAN_AND_MEAN

#include <windows.h>

int main()
{
  HANDLE hFile1 = CreateFile(L"MyTextFile.TxT",
                             GENERIC_WRITE | GENERIC_READ,
                             FILE_SHARE_READ, NULL, CREATE_ALWAYS,
                             FILE_ATTRIBUTE_NORMAL |
                             FILE_FLAG_POSIX_SEMANTICS,
                             NULL);

  if (hFile1 != INVALID_HANDLE_VALUE)
  {
    CloseHandle(hFile1);
  } // End If

  HANDLE hFile2 = CreateFile(L"mytextfile.txt",
                  GENERIC_WRITE | GENERIC_READ,
                  FILE_SHARE_READ, NULL, CREATE_ALWAYS,
                  FILE_ATTRIBUTE_NORMAL | FILE_FLAG_POSIX_SEMANTICS,
                  NULL);

  if (hFile2 != INVALID_HANDLE_VALUE)
  {
    CloseHandle(hFile2);
  } // End If

  return 0;
}  // End main() Function
[/code]

You may need to change registry key (WindowsXP Home/Pro) per article
http://support.microsoft.com/kb/817921.  I did this before checking whether
this change was required.

Attached is a screenshot of the result.  If anyone can point me to help
change TortioseSVN to work with case sensitive file names, at least for
myself, and so I can later submit a patch, I will be very grateful.

Please mark this as duplicate if it has already been considered (didn't
notice it when searching) :)

Hopefully Helpful,

TamusJRoyce

Original issue reported on code.google.com by jrgal...@gmail.com on 16 May 2010 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
This issue has been closed because it was not first discussed on the mailing 
list as 
clearly requested on the issue tracker front page.

Original comment by simon.to...@gmail.com on 16 May 2010 at 9:42

GoogleCodeExporter commented 9 years ago
No problem.  Sorry for not following protocol.

Original comment by jrgal...@gmail.com on 17 May 2010 at 4:27