default ignore file needs adjustment

Asked by Timmie

In Windows the default ignore file lists
*.a
*.o
*.py[co]
*.so
*.sw[nop]
*~
.#*
[#]*#
.BAK

As far as I understand "*.py[co]2 should also block "*.pyc". But it doesn't. I had to add this extension to the file for it to work.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Timmie
Solved:
Last query:
Last reply:

This question was originally filed as bug #246945.

Revision history for this message
Martin Pool (mbp) said :
#1

The pattern matching is supposed to be consistent across platforms.

Are you saying that if you have a bzrignore file containing '*.py[co]' it won't ignore foo.pyc on Windows?

Revision history for this message
Mark Hammond (mhammond) said :
#2

This works for me - '*.py[co]' ignores both .pyc and .pyo, while removing that line makes them show as 'unknown', which is expected.

Revision history for this message
Timmie (timmie) said :
#3

@Martin Pool:
Exactly. My collegue and an I have both bzr installed and working on the same repository.

My *.pyc do get ignored. But whenever I update to his changes I receive his *.pyc resulting in conflicts.

Revision history for this message
Vincent Ladeuil (vila) said :
#4

@Tim:

If you have conflicts on a file it means it is versioned.

It sounds like your colleague add a .pyc file explicitly (i.e. asking bzr to add the file whatever ignore rules exist).

One of you can/should 'bzr rm' the offending file(s) and from that point you should not encounter conflicts on them.

Revision history for this message
Timmie (timmie) said :
#5

I converted this into a question. It may be highly possible that my collegue or I did add it to bzr.

Anyway, I defined a .bzrignore to explude the doc/build/html also.

Thanks and regards.

Revision history for this message
Timmie (timmie) said :
#6

Please see my last message as reason for conversion to a Q&A item.