Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Mon, 25 Mar 2013 18:27:06 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 25 Mar 2013 18:27:06 +0100
branch
Py2 comp.
changeset 2546
dd9f912d5bd9
parent 2525
8b507a9a2d40
child 2847
1843ef6e2656
permissions
-rw-r--r--

Fixed an issue introduced by the last changes.
(grafted from 3868561e396213cc9222591938181c6b6d238faa)

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

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

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

from __future__ import unicode_literals    # __IGNORE_WARNING__

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