Comment 4 for bug 174607

Revision history for this message
David Roberts (smartgpx) wrote : Re: [Bug 174607] .bzrignore is not honoured. [Bazaar (bzr) 1.0.0.candidate.1 - win32]

On 07/12/2007, Ian Clatworthy <email address hidden> wrote:
> Alexander Belchenko wrote:
>
> >> H:\bzr>echo *.txt > .bzrignore
> >
> > ^-- The problem is here.
> > win32 echo command wrote to .bzrignore exact string that ends at '>'
> > sign, i.e. actually "*.txt ". So bzr try to match against file extension
> > "txt ". Because on windows you cannot create files with trailing spaces
> > this behavior is incorrect on windows. But pattern itself is probably
> > correct for linux.
> >
> > But if you actually invoke your command as:
> >
> > echo *.txt> .bzrignore
> >
> > then all works fine.
> >
> > I'm not sure how to fix this in cross-platform way.
>
> Sounds like trailing spaces in .bzrignore file should be trimmed. I
> can't think of a good reason for not doing that.
>
> Ian C.
>

Although my reaction to the 'feature' I have tripped over is "Aargh!",
I have to say I think the 'trailing spaces' fix is pragmatic but not
necessarily 'correct'. Having just been to look this up, I find to my surprise
that on *nix (posix?) filestores trailing white-space is syntactically
valid. In
which case a pattern that might match such a file must logically also be valid.

On Windows, it seems that trailing spaces in filenames are valid
for NTFS, but not for the win32 subsystem.

And the .bzrignore file should be versioned, so will be in the
branch, so might be transported from one OS to another...

Oh dear, I think I've wandered into a cross-platform minefield,
and maybe this should be closed as "Erroneous User Expectation"
rather than "Bug".

Sorry!

DJ

> --
> .bzrignore is not honoured. [Bazaar (bzr) 1.0.0.candidate.1 - win32]
> https://bugs.launchpad.net/bugs/174607
> You received this bug notification because you are a direct subscriber
> of the bug.
>