Plugins/VcsPlugins/vcsSubversion/SvnUtilities.py

Sun, 10 Jun 2012 17:55:19 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 10 Jun 2012 17:55:19 +0200
branch
5_2_x
changeset 1891
400900cc80b1
parent 1509
c0b5e693b0eb
child 1880
dbd4d7698310
child 2303
0ed4ed026c16
permissions
-rw-r--r--

Fixed an issue normalizing Subversion URLs on Windows (need to be all lowercase, i.e. canonicalized).

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

# Copyright (c) 2006 - 2012 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