Changing the directory names

Octavian Rasnita orasnita at gmail.com
Tue Jan 19 14:04:24 CST 2010


Thank you but it is not very elegant because it means that I will need to 
keep the badly-named directory, and make that rename on the server each time 
I clone the application on the server.

I have also tried to use those commands (hg mv) under Windows, but it 
doesn't seem to work fine.

hg mv Directory/ directory

... creates another Directory under the Directory, and moves in it the files 
that were under the initial Directory.

Octavian

----- Original Message ----- 
From: "Shridhar Daithankar" <ghodechhap at ghodechhap.net>
To: <mercurial at selenic.com>
Sent: Tuesday, January 19, 2010 8:01 PM
Subject: Re: Changing the directory names


> On Tuesday 19 January 2010 23:04:21 Octavian Rasnita wrote:
>> Hi,
>>
>> How can HG handle the change in the directory names?
>>
>> For example, by mistake I put a name of "Directory" for a directory, but 
>> it
>> should have been "directory".
>> The app was working fine under Windows because this OS doesn't care about
>> lower/upper case, but when I transfered it on the server, it crashed
>> miserably.
>
> Try following on server
> $ hg mv Directory directory
>
> Here is what it does
> $ hg init .
>
> $ mkdir Directory
>
> $ echo test >Directory/a.txt
>
> $ hg add Directory/a.txt
> adding Directory/a.txt
>
> $ hg ci -m"Initial"
> Directory/a.txt
> committed changeset 0:32572b82d7265216511a5ffa1a180a6fc2ef7b99
>
> $ hg mv Directory/ directory
> moving Directory/a.txt to directory/a.txt
>
> $ hg ci -m"rename"
> directory/a.txt
> directory/a.txt: copy
> Directory/a.txt:47e1a02b8587f450522a1cb73c3ef8ed21f2f923
> committed changeset 1:67ab11ff59ad070deb612cd31b41d0b1cc902088
>
> $ ls
> directory
>
>
> -- 
> Shridhar
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial 



More information about the Mercurial mailing list