Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

Sat, 02 Jun 2012 16:36:16 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 02 Jun 2012 16:36:16 +0200
changeset 1885
e51a12f1f404
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
permissions
-rw-r--r--

Improved the VCS copy/move operations a bit.

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