Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Mon, 05 Sep 2011 19:21:16 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 05 Sep 2011 19:21:16 +0200
branch
5_1_x
changeset 1291
d6ad28f5d85c
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
permissions
-rw-r--r--

Corrected focus handling of the various copy dialogs.
(transplanted from e131e4f5446b60b02fac886cac0029ee83179a6c)

# -*- 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