[RFC/MERGE] disabling kind markers for 'bzr status'

John Arbash Meinel john at arbash-meinel.com
Fri May 4 18:20:12 BST 2007


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

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> James Troup mentioned on IRC that he would like to remove the kind
>>> markers from 'bzr status'. He was talking about using "bzr status" in
>>> pipelines. I'm not sure exactly how, but I would guess he was doing
>>> something like:
>>> 1) bzrlib/delta.py doesn't use 'osutils.kind_marker()' and instead
>>> re-produces the logic locally. (And messes up because it doesn't handle
>>> the new tree references).
> 
> That is fossil code.  We use ChangeReporter for short status now, and
> that does use osutils.kind_marker.

For short status, but for long we still use the other code.

At the very least, my plugin doesn't do anything for 'bzr status'
without my patch.

> 
>>> He thought it would be reasonable to disable it with a 'isatty()' check,
>>> I'm not sure if we would want to do that or not.
> 
> No.  Never.  isatty is not a reasonable way to determine whether this is
> an interactive session, because we don't know what we're piping TO.  It
> may well be "/usr/bin/less".
> 
>>> We could disable it with an ENV var, or we could make it a flag to
>>> 'show_tree_status'. The flag would need to be propagated a bit, but not
>>> terribly far.
> 
> You mean a flag to ChangeReporter I hope?
> 
> Aaron

I don't think we use ChangeReporter as much as you think we do.

If you look at:
https://bugs.launchpad.net/bzr/+bug/112390

You can see that I was mistaken about "--short". He is just selecting
modified files based on matching a regex.


Regardless, the flag has to be on 'show_tree_status' because that is
being called from 'cmd_status.run()'. Whether the final *user* is
ChangeReporter or TreeDelta.show() that is the "it must be propagated a
bit".

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGO2tMJdeBCYSNAAMRAlM8AJ0c+5V/EPPbagYrURqYbYEg/U2uRwCeMiJz
vokpA5hEkCBrIeLm3LK8PwM=
=ocM+
-----END PGP SIGNATURE-----



More information about the bazaar mailing list