[RFC, MAYBE-MERGE] DEFAULT_IGNORE as an API (Re: Problem with bzr without default ignore list.)

Adeodato Simó dato at net.com.org.es
Wed Jul 12 13:28:24 BST 2006


* Martin Pool [Tue, 11 Jul 2006 14:51:24 +1000]:

> That's very creative, I hadn't realized that anyone would treat it as
> writable.

Heh.

> > I'd ask that, please, DEFAULT_IGNORE gets redefined as an empty list,
> > and get_ignore_list() in workingtree.py goes back to using it. The old
> > default list can be shipped in eg. OLD_DEFAULT_IGNORE, and `ignore
> > --old-default-rules` can use that. (This should be trivial, something
> > along the lines of the attached patch.)

> But in principle it's equally likely that plugins are depending on that
> list containing the patterns and will be confused/broken if it becomes
> empty...

Hm. The two cases I know of, bzrtools/shelf and Tailor, only do a
DEFAULT_IGNORE.append/extend. Matthieu can talk for DVC.

> How about adding an extra_ignores list which plugins can modify?  Or
> perhaps rather than being a global variable it should be just a
> parameter to add and status?

A new list would work fine, of course, though existing code that works
against 0.8 will not against 0.9, and if new code wants to care about
0.8, it'll have to try whether bzrlib.EXTRA_IGNORE (or whatever) exists
or not. I realize per your comment above that DEFAULT_IGNORE was not
intended as an API, but well, it's been a de facto one.

As for just a parameter to add an status, I don't think it'd work unless
such parameter would default to EXTRA_IGNORE anyway? (Since, otherwise,
how could a plugin like shelf ensure that status gets ['./.shelf'] into
that parameter when called?)

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
                       Listening to: Maximilian Hecker - Daze Of Nothing





More information about the bazaar mailing list