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

[TSVN] Re: Re: Tag/Branch name checking suggestion.

From: Simon Large <slarge_at_blazepoint.co.uk>
Date: 2005-01-20 10:47:51 CET

Will Dean wrote:
> At 22:45 19/01/2005 +0100, you wrote:
>
>> see
>>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/naming_a_file.asp
>>
>> It does not catch all naming errors (like ".."), but it might be a
>> good start.
>
> It seems a reasonable approach. If we pass it a URL, we would need
> to skip past the "protocol:" bit.

Which is not so easy. How do you know where the protocol and remote FS
ends and the repository begins? A while back I asked for the repo
browser not to show the tree above the repository root, but since
realised that this can't be done.

Illegal names can only be a problem when creating files/folders directly
in the repository (anything created locally will be thrown out by
Windows itself). There are a few specific cases here:

1. Create new item in the repository.
Only need to check the new part of the path, relative to the parent
path.

2. Copy/branch/tag
This involves copying _from_ somewhere within the same repo, although
the paths may only be distantly related. Go back up to the common part
of the path and check from there.

In both cases it would be fairly easy to check for paths ending in CON,
AUX, etc. Because almost no-one uses those features anymore, it would be
easy to forget that they are still invalid filenames.

> Of course, as Stefan (I think) said, this can only be a warning, as it
> would be legitimate (but probably unusual) to create a repos which
> could be checked out on a different OS, or even to create one where
> one only checked-out below a certain point in the hierarchy, (i.e.
> with the invalid chars 'above you').

Agreed, which neatly covers the holes in the scheme above. If you want
anything more complete or more binding, you can write a pre-commit hook.

Simon

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 20 11:33:56 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.