Plugins/VcsPlugins/vcsSubversion/SvnUtilities.py

Wed, 30 Dec 2009 15:40:33 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2009 15:40:33 +0000
changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 13
1af94a91f439
permissions
-rw-r--r--

Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.

# -*- coding: utf-8 -*-

# Copyright (c) 2006 - 2009 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing some common utility functions for the subversion package.
"""

import sys
import os

from PyQt4.QtCore import QDateTime, Qt

import Utilities

def getServersPath():
    """
    Public method to get the filename of the servers file.
    
    @return filename of the servers file (string)
    """
    if Utilities.isWindowsPlatform():
        appdata = os.environ["APPDATA"]
        return os.path.join(appdata, "Subversion", "servers")
    else:
        homedir = Utilities.getHomeDir()
        return os.path.join(homedir, ".subversion", "servers")

def getConfigPath():
    """
    Public method to get the filename of the config file.
    
    @return filename of the config file (string)
    """
    if Utilities.isWindowsPlatform():
        appdata = os.environ["APPDATA"]
        return os.path.join(appdata, "Subversion", "config")
    else:
        homedir = Utilities.getHomeDir()
        return os.path.join(homedir, ".subversion", "config")

eric ide

mercurial