[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Files ending with . (dot) on Windows

From: Staton, Bradley D. <BRADLEY.D.STATON_at_saic.com>
Date: Thu, 11 Jul 2013 15:31:07 -0400

We recently added files from a 3rd party tool to our repository and some
of the file names end with . (dot). On UNIX systems, this is perfectly
fine and everyone is happy, but on Windows systems the files are
reported as missing and a corresponding file without the . at the end of
the file name is listed as not being under version control (with SVN
1.6.17 client) or the repository just can't be checked out (with SVN
1.8.0 client).

This doesn't appear to be a bug in Subversion, as Windows doesn't allow
files to end with a dot and doesn't seem to handle them gracefully when
they do. From http://msdn.microsoft.com/en-us/library/aa365247.aspx:

"Do not end a file or directory name with a space or a period. Although
the underlying file system may support such names, the Windows shell and
user interface does not. However, it is acceptable to specify a period
as the first character of a name. For example, ".temp"."

Here's a simple walkthrough that demonstrates the behavior:

On a UNIX system add a file with a name ending in . to the repository:

-bash-3.00$ touch src/main/resources/fileEndingWithDot.
-bash-3.00$ svn status
? src/main/resources/fileEndingWithDot.
-bash-3.00$ svn add src/main/resources/fileEndingWithDot.
A src/main/resources/fileEndingWithDot.
-bash-3.00$ svn commit . -m "Adding a file with name ending in dot to
demonstrate behavior on Windows"
Adding src/main/resources/fileEndingWithDot.
Transmitting file data
Committed revision 22.
-bash-3.00$ svn status
-bash-3.00$

As you can see, everything works as expected.

When using an older svn client on Windows (svn, version 1.6.17
(r1128011) compiled Jun 2 2011, 23:35:08, Copyright (C) 2000-2009
CollabNet) it's possible to check out the repository:

C:\tmp\playrepo>svn co <path/to/repo/>/trunk
A trunk\.classpath
A trunk\.project
A trunk\src
A trunk\src\test
A trunk\src\test\java
A trunk\src\test\resources
A trunk\src\main
A trunk\src\main\java
A trunk\src\main\java\com
A trunk\src\main\java\com\saic
A trunk\src\main\java\com\saic\isd
A trunk\src\main\java\com\saic\isd\TestInterface.java
A trunk\src\main\java\com\saic\isd\HelloWorld.java
A trunk\src\main\resources
A trunk\src\main\resources\fileEndingWithDot.
A trunk\pom.xml
 U trunk
Checked out revision 22.

But users constantly get a misleading status on the files with problem
file names.

C:\tmp\playrepo\trunk>svn status
? src\main\resources\fileEndingWithDot
! src\main\resources\fileEndingWithDot.
C:\tmp\playrepo\trunk>

In a recent svn client on Windows (svn, version 1.8.0 (r1490375)
compiled Jun 17 2013, 08:08:13 on x86-microsoft-windows, Copyright (C)
2013 The Apache Software Foundation) attempting to check out the
repository fails:

C:\tmp\playrepo>svn co <path/to/repo/>/trunk
A trunk\.classpath
A trunk\.project
A trunk\src
A trunk\src\test
A trunk\src\test\java
A trunk\src\test\resources
A trunk\src\main
A trunk\src\main\java
A trunk\src\main\java\com
A trunk\src\main\java\com\saic
A trunk\src\main\java\com\saic\isd
A trunk\src\main\java\com\saic\isd\TestInterface.java
A trunk\src\main\java\com\saic\isd\HelloWorld.java
A trunk\src\main\resources
svn: E155000: 'fileEndingWithDot.' is not valid as filename in directory
'C:\tmp\playrepo\trunk\src\main\resources'

Is there a known work around for this? Was there a conscious decision
between 1.6 and 1.8 to change this behavior, or have I stumbled across a
bug? Our Windows users can continue to use the older svn client so that
working with the repo is still possible, but they'd like to stop seeing
the missing/not controlled status messages. Normally, I'd just rename
the files to something that both platforms can handle, but since these
files are delivered from a 3rd party I'd like to avoid that if at all
possible.

I'm not subscribed to this list and would appreciate being explicitly
cc'ed in any responses. Thanks in advance for any help or advice!

--Brad Staton
statonb_at_saic.com
Received on 2013-07-11 23:56:56 CEST

This is an archived mail posted to the Subversion Users mailing list.