Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Sat, 22 Oct 2011 13:20:50 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 22 Oct 2011 13:20:50 +0200
changeset 1378
f18a99689f2a
parent 945
8cd4d08fa9f6
child 1509
c0b5e693b0eb
permissions
-rw-r--r--

Fixed an issue in the Mercurial command line server interface code of commit causing a commit of a merge to fail.

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