Plugins/VcsPlugins/vcsSubversion/SvnUtilities.py

Wed, 07 Sep 2011 18:08:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 07 Sep 2011 18:08:56 +0200
branch
5_1_x
changeset 1301
a2b0aceba6a2
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
permissions
-rw-r--r--

Fixed an issue in the various diff dialogs writing the patch (this time properly).
(transplanted from 9083f6b7ea3ba0274761eb49e2728e71dab9e54d)

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

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

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

import os

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