~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

Lines of Context:
821
821
    return osutils.pathjoin(config_dir(), 'ignore')
822
822
 
823
823
 
 
824
def crash_dir():
 
825
    """Return the directory name to store crash files.
 
826
 
 
827
    This doesn't implicitly create it.
 
828
 
 
829
    On Windows it's in the config directory; elsewhere in the XDG cache directory.
 
830
    """
 
831
    if sys.platform == 'win32':
 
832
        return osutils.pathjoin(config_dir(), 'Crash')
 
833
    else:
 
834
        return osutils.pathjoin(xdg_cache_dir(), 'crash')
 
835
 
 
836
 
 
837
def xdg_cache_dir():
 
838
    # See http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
 
839
    # Possibly this should be different on Windows?
 
840
    e = os.environ.get('XDG_CACHE_DIR', None)
 
841
    if e:
 
842
        return e
 
843
    else:
 
844
        return os.path.expanduser('~/.cache')
 
845
 
 
846
 
824
847
def _auto_user_id():
825
848
    """Calculate automatic user identification.
826
849