Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Fri, 04 Mar 2011 19:12:07 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 04 Mar 2011 19:12:07 +0100
changeset 932
efd23a913a09
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
permissions
-rw-r--r--

Finished extending the Mercurial log browser to indicate closed branches.

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