[RFC] Ignoring versioned directory ignores all child files

Jan Hudec bulb at ucw.cz
Fri Sep 1 13:56:25 BST 2006


On Sat, Aug 26, 2006 at 10:47:55AM +1000, Martin Pool wrote:
> On 25 Aug 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> > https://launchpad.net/products/bzr/+bug/57637
> > 
> > Recently someone was trying to version their home directory, and wanted
> > to ignore all dot files, but have them versioned in a special sub-directory.
> > 
> > So after doing 'bzr ignore "./.*"' and then 'bzr add .dotfiles/', he
> > found that all of the files in '.dotfiles/' were defaulting to being
> > ignored.
> > 
> > He thought it was because they were also dot files, but really it is
> > because the full path to the files matches the regex. And this is
> > because fnmatch expands '*' => '.*' rather than '[^/]*' or something
> > equivalent.
> 
> I consider that an fnmatch bug, so we should feel free to fix it.  The
> specification is that they're unix globs.
> 
> > I think we need to look into using Jan's custom ignore creator, rather
> > than fnmatch. We already broke behavior between 0.8 and 0.9 (though we
> > tried to keep it fairly similar)

Yes, the code is still lying around somewhere. The issue back then was
the desire not to break the compatibility.

The Replacer stuff itself allows tweaking the meaning of globs to hearts
content, because it is really defined by table of translations to regex.
I can dig it out, though it will be a bit complicated now since my
internet link at home is currently out of order.

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb at ucw.cz>




More information about the bazaar mailing list