Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Sun, 08 May 2011 15:19:58 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 08 May 2011 15:19:58 +0200
changeset 1020
adf7e95f05e7
parent 945
8cd4d08fa9f6
child 1509
c0b5e693b0eb
permissions
-rw-r--r--

Finished Mercurial bookmark support.

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

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