3

I'm trying to create .hgignore, but I'm getting You must type a file name error.

How can I create this file?

flag

3 Answers

5

I found the answer over here: http://stackoverflow.com/questions/19442/how-to-allow-files-starting-with-period-and-no-extension-in-windows-2003-server

That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt:

echo Hello there! > .hgignore
link|flag
4

Assuming you've got TortoiseHg installed and a repository cloned locally, try the following:

  1. Open an Explorer window.
  2. Browse to a folder within where you've cloned your repository to.
  3. Right click, go down to TortoiseHg in the context menu.
  4. A further menu will appear, from it click Edit Ignore Filter.
  5. Use the resulting popup to configure your ignore filters. This gives you a .hgignore file.
  6. On your next Commit it will list it for you to add to the repository.
link|flag
0

This behavior is based on a "feature" of dos 8.3 where it was forbidden to have a file without a name.

Name the folder .name.

So the Explorer thinks you will create a file with a name but no extension(which is allowed). The explorer will then delete the dot at the end because it is unnecessary.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.