Plugins/VcsPlugins/vcsMercurial/HgUtilities.py

changeset 178
dd9f0bca5e2f
child 791
9ec2ac20e54e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/HgUtilities.py	Mon Apr 12 18:00:42 2010 +0000
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (c) 2010 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