Update fails with long file name
Aaron Cohen
aaron at assonance.org
Tue Sep 29 21:34:44 UTC 2015
On Tue, Sep 29, 2015 at 5:29 PM, Adrian Buehlmann <adrian at cadifra.com>
wrote:
> On 2015-09-29 23:06, Aaron Cohen wrote:
> > For the record, regarding the file named "aux" issue.
> >
> > 1) When you hg add a reserved file name such as "aux"
> >
> >> echo "test" > aux
> >> hg add aux
> > warning: filename contains 'aux', which is reserved on Windows: 'aux'
>
> Yep. See also the ui.portablefilenames config option [1]
>
> > 2) If you clone or pull from this repo, on Windows you get an abort,
> > with or without my extension:
> >> hg clone test.bundle test
> > requesting all changes
> > adding changesets
> > adding manifests
> > adding file changes
> > added 1 changesets with 1 changes to 1 files
> > updating to branch default
> > abort: filename contains 'aux', which is reserved on Windows: 'aux'
>
> I think the clone or pull by itself is not aborted - just the update
> step. Because it tries to update to a revision containing a reserved
> filename.
>
> [1] https://www.selenic.com/mercurial/hgrc.5.html#ui
>
You're right, and it's possible to see the contents of the aux file using
something like "hg cat -r 0 aux" which is better than nothing.
I'm not sure what best way to improve the situation is, I see two options:
1) Checkout the file with a warning to some alternate non-reserved name so
something like:
> hg clone test.bundle test
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
updating to branch default
warning: filename contains 'aux', which is reserved on Windows: renamed to
'!aux'
Disadvantages:
a) Breaks the build if anything depended on "aux" to actually have the
right name.
b) I fear reverse-mapping changes to the "!aux" file so that they end up
committed in the right place wouldn't be entirely trivil
2) Use the "\\.\aux" api to actually create the file. I think this option
is just asking for pain and misery.
As I've never received a request from anyone concerned that they can't
check out a file with a reserved name, I'm not especially eager to take
this up at the moment.
--Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150929/8ff2022f/attachment-0002.html>
More information about the Mercurial
mailing list