Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Sat, 14 Jan 2012 15:35:19 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 14 Jan 2012 15:35:19 +0100
changeset 1550
0550f9915d65
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
permissions
-rw-r--r--

Fixed an issue stopping the Mercurial commandline server.

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

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