Submitter | Katsunori FUJIWARA |
---|---|
Date | May 6, 2013, 8:35 p.m. |
Message ID | <c35e25c868fcf17fef32.1367872505@juju> |
Download | mbox | patch |
Permalink | /patch/1570/ |
State | Accepted, archived |
Commit | 0848be1f1aad3eb8e8c5cace140616cd7b70ada8 |
Headers | show |
Comments
On Tue, 2013-05-07 at 05:35 +0900, FUJIWARA Katsunori wrote: > # HG changeset patch > # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp> > # Date 1367870651 -32400 > # Tue May 07 05:04:11 2013 +0900 > # Branch stable > # Node ID c35e25c868fcf17fef3239dd43f03031aa5980fb > # Parent a5d959e18918dbd0cf01ab193a00b5ba83c93596 > largefiles: check existence of the file with case awareness of the filesystem Looks like this will work (at least partly) independently of the earlier patches. Queued for stable, thanks.
Patch
diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -502,7 +502,8 @@ # lfile is added to the repository again. This happens when a # largefile is converted back to a normal file: the standin # disappears, but a new (normal) file appears as the lfile. - if os.path.exists(abslfile) and lfile not in repo[None]: + if (os.path.exists(abslfile) and + repo.dirstate.normalize(lfile) not in repo[None]): util.unlinkpath(abslfile) ret = -1 state = repo.dirstate[lfutil.standin(lfile)] diff --git a/tests/test-casefolding.t b/tests/test-casefolding.t --- a/tests/test-casefolding.t +++ b/tests/test-casefolding.t @@ -106,6 +106,28 @@ [255] $ cat a gold + $ rm a + +test that normal file in different case on target context is not +unlinked by largefiles extension. + + $ cat >> .hg/hgrc <<EOF + > [extensions] + > largefiles= + > EOF + $ hg update -q -C 1 + $ hg status -A + $ echo 'A as largefiles' > A + $ hg add --large A + $ hg commit -m '#3' + created new head + $ hg manifest -r 3 + .hglf/A + $ hg manifest -r 0 + a + $ hg update -q -C 0 + $ hg status -A + C a $ cd ..