[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Merging dirs with (almost) same name

On Wed, May 03, 2006 at 10:45:24AM +0200, listrcv wrote:
>Magnus Therning wrote:
>> top/sub1/sub2
>> top/Sub1/sub2
>> ...
>>Is there some way (other than mounting a case insensitive file system,
>>such as FAT) to merge these directories?
>How did you manage to split up the directories?

It's a p4[1] depot, running on a Windows machine, with the vast majority of
clients being Windows machines as well. The server and the other users
don't have this problem since they all use a case insensitive filesystem.
Unfortunately for me, they also use a case preserving filesystem, which
results in me having this problem.

>How do you define 'merge'?

"The end result is a dir hierarchy similar to what I'd get on Windows."

Server filename    Win client filename  Lnx client filename
---------------    -------------------  -------------------
top/foo.txt        top/foo.txt          top/foo.txt
Top/bar.txt        top/bar.txt          Top/bar.txt

On Windows I end up with only one directory, 'top', on Linux with two
'top' and 'Top'. I can't change the p4 client and it doesn't have any
configuration option to change its behaviour in this respect. What I'd
like is a tool that will merge 'top' and 'Top' into one directory.

(I am aware this probably will screw up p4's view on my local work
space, but I really couldn't care less in this particular case.)

>What would you do with files like
>  top/sub1/sub2/foo.txt
>  top/Sub1/sub2/foo.txt
>  top/Sub1/Sub2/Foo.txt

This problem simply doesn't exist due to the nature of the filesystem on
the server :-)

>Check out the --backup option of cp; find, xargs and eventually sed may
>also be helpful.

Could you offer some more information on how this could be helpful?
AFAICS it's about as helpful as saying "Check out Python, it may be
helpful" (you can replace Python with your favourite scripting language
of course :-).


1. http://perforce.com/

Magnus Therning                    (OpenPGP: 0xAB4DFBA4)

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

DRM discourages piracy like Thalidomide promotes healthy childbirth.
     -- Mark Hewitt, on the ORG discuss list

Attachment: pgp_GHN8ZQaxf.pgp
Description: PGP signature

Reply to: