/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to brzlib/osutils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 14:47:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521144752-8o6jt0a6xat9g7lm
More renames; commands in output, environment variables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1551
1551
    None is returned if the width can't established precisely.
1552
1552
 
1553
1553
    The rules are:
1554
 
    - if BZR_COLUMNS is set, returns its value
 
1554
    - if BRZ_COLUMNS is set, returns its value
1555
1555
    - if there is no controlling terminal, returns None
1556
1556
    - query the OS, if the queried size has changed since the last query,
1557
1557
      return its value,
1582
1582
    # time so we can notice if the reported size has changed, which should have
1583
1583
    # a similar effect.
1584
1584
 
1585
 
    # If BZR_COLUMNS is set, take it, user is always right
 
1585
    # If BRZ_COLUMNS is set, take it, user is always right
1586
1586
    # Except if they specified 0 in which case, impose no limit here
1587
1587
    try:
1588
 
        width = int(os.environ['BZR_COLUMNS'])
 
1588
        width = int(os.environ['BRZ_COLUMNS'])
1589
1589
    except (KeyError, ValueError):
1590
1590
        width = None
1591
1591
    if width is not None:
1596
1596
 
1597
1597
    isatty = getattr(sys.stdout, 'isatty', None)
1598
1598
    if isatty is None or not isatty():
1599
 
        # Don't guess, setting BZR_COLUMNS is the recommended way to override.
 
1599
        # Don't guess, setting BRZ_COLUMNS is the recommended way to override.
1600
1600
        return None
1601
1601
 
1602
1602
    # Query the OS
2390
2390
    if _cached_local_concurrency is not None and use_cache:
2391
2391
        return _cached_local_concurrency
2392
2392
 
2393
 
    concurrency = os.environ.get('BZR_CONCURRENCY', None)
 
2393
    concurrency = os.environ.get('BRZ_CONCURRENCY', None)
2394
2394
    if concurrency is None:
2395
2395
        try:
2396
2396
            import multiprocessing