Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Wed, 24 Jul 2013 18:59:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 24 Jul 2013 18:59:34 +0200
branch
5_3_x
changeset 2818
add8426ea430
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 2816
05aab5164d64
child 3163
9f50365a0870
permissions
-rw-r--r--

Fixed an issue in the Mercurial VCS module.
(grafted from 961fba66e01948b082fdf4b3a50b1308ec709c6b)

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

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

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

import os

import Utilities


def getConfigPath():
    """
    Public method to get the filename of the config file.
    
    @return filename of the config file (string)
    """
    if Utilities.isWindowsPlatform():
        userprofile = os.environ["USERPROFILE"]
        return os.path.join(userprofile, "Mercurial.ini")
    else:
        homedir = Utilities.getHomeDir()
        return os.path.join(homedir, ".hgrc")

eric ide

mercurial