bzr ignored does not show subdirectories

Asked by teson

I try to exclude subdirs but they wont show up at bzr ignored (listed in .bzrignored they are),

bzr ignore "./sqlcache" => works
bzr ignore "./public/pp_public/pp_images" => not working
bzr ignore (as above without leading ./) => not working

bzr ignored shows only directories from top level,
.bzrignored shows all added entries.

Is it a bug or is it me?

a bzr-yoda i am not, so thankful for any help in this matter, :-)

OS: ubuntu 8.04 LTS
BZR-version: 1.3.1

Regards,
/teson

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
teson
Solved:
Last query:
Last reply:
Revision history for this message
Parth Malwankar (parthm) said :
#1

Hi teson,

This could be a bug thats been fixed in newer bzr versions. I was not able to reproduce it with bzr 2.0, 2.1 and trunk.
Bazaar 1.3.x is _really_ old. bzr 2.x series is much more efficient in terms of speed, memory and disk usage and a whole lot of bug fixes since 1.3 :).
You could consider upgrading using the bzr ppas at:

https://launchpad.net/~bzr/+archive/ppa

[xyz]% mkdir -p p/q/r
[xyz]% bzr ignore ./p/q/r
[xyz]% bzr st
added:
  .bzrignore
unknown:
  p/
[xyz]% bzr add p
adding p
adding p/q
[xyz]% bzr ci -m "initial"
Committing to: /home/parthm/tmp/xyz/
added .bzrignore
added p
added p/q
Committed revision 1.
[xyz]% bzr ignored
p/q/r ./p/q/r
[xyz]% ~/src/bzr.dev/2.1/bzr ignored
p/q/r ./p/q/r
[xyz]% ~/src/bzr.dev/2.0/bzr ignored
p/q/r ./p/q/r
[xyz]%

Revision history for this message
teson (tjelvar) said :
#2

Hi Parth and thanks for fast reply!

I've upgraded to 2.1.1, (removed old .bzr-dir, bzr init) and still not functional as it seems;

# cat .bzrignore
./sqlcache
./tmp
./public/pp_public/pngtext
(all directories exists and no symb-links)

# bzr ignored
sqlcache ./sqlcache
tmp ./tmp

# bzr ls --ignored
sqlcache/
tmp/

Adding additional dirs at top-level works fine, any directory or file not under top fails.

The issue is persistant,
./sqlcache (ok)
./tmp (ok)
./public/pp_public/pngtext (fail)
./public/.DS_Store (fail)
./public/ign (fail)
./var (ok)
./public/_admin.php (fail)

Is bzr written in perl? I'm running 5.8.8, no upgrade notification from default 8.04 repostory however.

Regards,
/teson

Revision history for this message
Parth Malwankar (parthm) said :
#3

Hi teson,

Thats weird. Could you try the following script and post the results.

--------8<--------------------------------------
#!/bin/sh
bzr init a1234
cd a1234
mkdir -p p/q/r
bzr ignore ./p/q/r
bzr st
bzr add p
bzr ci -m "initial"
echo "###### bzr ignored #####"
bzr ignored
------------------------>8-----------------------

Here is the output I see.

[tmp]% sh -e ig_test.sh
Created a standalone tree (format: 2a)
added:
  .bzrignore
unknown:
  p/
adding p
adding p/q
Committing to: /home/parthm/tmp/a1234/
added .bzrignore
added p
added p/q
Committed revision 1.
###### bzr ignored #####
p/q/r ./p/q/r
[tmp]%

bzr is written in Python and should work correctly with Python 2.4 and above. "bzr version" command gives the details of bzr version and also the python version. Could you please post that also.

Regards,
Parth

Revision history for this message
teson (tjelvar) said :
#4

Thanks again, Paul,

your script works fine over here and now I finally get it,

toplevel-directories are shown immidiately on bzr ignored,
subdirs not until commit. :-|

With ~30 MB of autogenerated (non neccesary) content,
I hesitated commiting the inital branch, silly me...

Any way, Thanks for all your help!

Best regards,

//teson

Revision history for this message
teson (tjelvar) said :
#5

correction to last post,

not commit,
# bzr add .

Revision history for this message
John A Meinel (jameinel) said :
#6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Parth Malwankar wrote:
> Question #112103 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/112103
>
> Status: Open => Answered
>
> Parth Malwankar proposed the following answer:
> Hi teson,
>
> This could be a bug thats been fixed in newer bzr versions. I was not able to reproduce it with bzr 2.0, 2.1 and trunk.
> Bazaar 1.3.x is _really_ old. bzr 2.x series is much more efficient in terms of speed, memory and disk usage and a whole lot of bug fixes since 1.3 :).
> You could consider upgrading using the bzr ppas at:
>
> https://launchpad.net/~bzr/+archive/ppa
>

If a file is already added, it won't be ignored. It is possible that you
added the subdir before you tried to ignore it.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkv6newACgkQJdeBCYSNAAOgjgCcCHQFTdLsiYjEiz8roMVDz5s5
FPMAn2Hoc5ohzFUObwHIFkGMEYrPqQTG
=mQVW
-----END PGP SIGNATURE-----

Revision history for this message
teson (tjelvar) said :
#7

Good Evening Parth, (+1 GMT in Sweden)
For me it still doesn't make sense, with some modification,
here's a simulation of this visual bug or "feature".

#!/bin/sh
rm -rf a1234
mkdir a1234
cd a1234
bzr init
mkdir -p p/q/r
mkdir -p s/t
bzr ignore ./p/q/r
bzr ignore ./s
echo "###### bzr ignored #####"
bzr ignored
echo "only outputs ./s as ignored"
bzr add .
echo "adding p, adding p/q"
bzr ignored
echo "finally as expected"

Feel free to post is as a bug if appropriate,

May the Force be with you, John, :-)

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

On 25 May 2010 04:23, teson <email address hidden> wrote:
> Question #112103 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/112103
>
> teson posted a new comment:
> Good Evening Parth, (+1 GMT in Sweden)
> For me it still doesn't make sense, with some modification,
> here's a simulation of this visual bug or "feature".
>
> #!/bin/sh
> rm -rf a1234
> mkdir a1234
> cd a1234
> bzr init
> mkdir -p p/q/r
> mkdir -p s/t
> bzr ignore ./p/q/r
> bzr ignore ./s
> echo "###### bzr ignored #####"
> bzr ignored
> echo "only outputs ./s as ignored"
> bzr add .
> echo "adding p, adding p/q"
> bzr ignored
> echo "finally as expected"
>
> Feel free to post is as a bug if appropriate,

Thanks, that clarifies it nicely.

At the moment where you first run 'bzr ignored', p is an unversioned
and unknown directory. Running 'bzr st' would tell you about this.
bzr never descends into unversioned directories therefore it won't
tell you about ignored files within them. In other words, 'bzr
ignored' tells you about ignored entries within versioned directories.
 I can see that it might be useful to at least optionally tell you
about ignored files in unversioned directories, to give you an idea of
what will be added. You can create a wishlist bug if you want.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Robert Collins (lifeless) said :
#9

Note that we do have 'add --dry-run'. Maybe thats not enough.