Occasional case-folding error when trying to transplant or graft

JohnRenstrom John.Renstrom at HexagonMetrology.com
Thu Feb 2 15:08:20 UTC 2012


It is a pain, but we just remove the file (with the bad case) in one changeset then add the file (with desired case) back in a second changeset...This seems to be the only way we have been able to resolve the problem...

 

Just wait for the day when the same file w/mixed case has been added to two different branches and you try to perform a transplant/graft...That is when your head wants to spin 360 degrees and explode!  ;(

 

From: rupert THURNER [via Mercurial] [mailto:ml-node+s808500n3709540h84 at n3.nabble.com] 
Sent: Thursday, February 02, 2012 3:40 AM
To: John Renstrom
Subject: Re: Occasional case-folding error when trying to transplant or graft

 

On Feb 1, 7:04 pm, Matt Mackall <[hidden email]> wrote: 


> On Tue, 2012-01-31 at 22:42 -0800,rupert.thurner wrote: 
> > On Jan 17, 7:10 pm, Matt Mackall <[hidden email]> wrote: 
> > > On Mon, 2012-01-16 at 15:46 -0800, JohnRenstrom wrote: 
> > > > We've been using Mercurial for several years at my company and every once in 
> > > > a while we will get that painful case-folding scenario; By using some custom 
> > > > hooks on push we have been able to catch these problems before they get 
> > > > pushed out to the main repository which has dramatically improved our down 
> > > > time.  Now it is just a local issue that one developer must resolve before 
> > > > his changeset can be pushed to the server. 
> 
> > > > We still bump into occasional case-folding issues with transplant/graft and 
> > > > today while I was examining one of these issues I may have stumbled onto a 
> > > > reason why they seem to come and go so randomly. 
> 
> > > > *My Theory:* 
> > > > AlthoughWindowsis a case-insensitive OS it does still preserve case; I 
> > > > noticed today that the same file had been added to two different branches: 
> > > >    Branch 1: 'Filename.txt' 
> > > >    Branch 2: 'FILENAME.TXT'    (AllUppercase) 
> 
> > > You probably have a tool in your toolchain that's helpfully uppercasing 
> > > filenames on write. We've seen this with various editors. 
> 
> > > Mercurial itself will studiously ignore such changes for -existing- 
> > > files. But for newly-added files, it will take the on-disk 
> > > capitalization. After that, merges with case collisions might have 
> > > "interesting" results onWindows. 
> 
> > > Recent Mercurial (as of 2.0.2 on Jan 1!) will refuse to merge branches 
> > > if there's a case conflict and you're using a case-insensitive 
> > > filesystem. This will probably "solve" your graft/transplant issue, but 
> > > you'll probably need to harmonize filenames across all your branches to 
> > > actually do any grafts. 
> > modernwindowsfilesystem is case sensitive like most the other 
> > filesystems, as it stores the case of the filename. and it is 
> > perfectly fine to do: 
> 
> Basically everyone (including Microsoft, in your cite) refers to that 
> behavior as "case-insensitive". 
> 
> > $ move FILE file 
> > while mercurial gives an error on 
> > $ hg mv FILE file 
> 
> Known issue with trivial workaround. 
> 
> > such awindowsfilesystem move confuses mercurial (at least v-2.0) 
> > completely. if one changes the file and moves it, mercurial displays 
> > the file two times: 
> > $ hg st 
> > M FILE 
> > ? file 
> 
> Works for me. Please file a bug with a test case if it's still present 
> in 2.0.2 or 2.1. 


i tested it on windows7 and hg-2.1, and indeed the output is 
different: 
 $ hg st 
 M FILE 

now i am wondering what i need to do to lowercase the file in the 
repository, as we develop mostly on windows, and run the software on 
unix. 

rupert. 
_______________________________________________ 
Mercurial-devel mailing list 
[hidden email] 
http://selenic.com/mailman/listinfo/mercurial-devel



________________________________

If you reply to this email, your message will be added to the discussion below:

http://mercurial.808500.n3.nabble.com/Occasional-case-folding-error-when-trying-to-transplant-or-graft-tp3664778p3709540.html 

To unsubscribe from Occasional case-folding error when trying to transplant or graft, click here <http://mercurial.808500.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3664778&code=Sm9obi5SZW5zdHJvbUBIZXhhZ29uTWV0cm9sb2d5LmNvbXwzNjY0Nzc4fDM4MDY4NjU4> .
NAML <http://mercurial.808500.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>  



--
View this message in context: http://mercurial.808500.n3.nabble.com/Occasional-case-folding-error-when-trying-to-transplant-or-graft-tp3664778p3710137.html
Sent from the Development mailing list archive at Nabble.com.



More information about the Mercurial-devel mailing list