76 has changed |
76 has changed |
77 """ |
77 """ |
78 committed = pyqtSignal() |
78 committed = pyqtSignal() |
79 activeExtensionsChanged = pyqtSignal() |
79 activeExtensionsChanged = pyqtSignal() |
80 |
80 |
|
81 IgnoreFileName = ".hgignore" |
|
82 |
81 def __init__(self, plugin, parent=None, name=None): |
83 def __init__(self, plugin, parent=None, name=None): |
82 """ |
84 """ |
83 Constructor |
85 Constructor |
84 |
86 |
85 @param plugin reference to the plugin object |
87 @param plugin reference to the plugin object |
1111 Public method returning the name of the vcs. |
1113 Public method returning the name of the vcs. |
1112 |
1114 |
1113 @return always 'Mercurial' (string) |
1115 @return always 'Mercurial' (string) |
1114 """ |
1116 """ |
1115 return "Mercurial" |
1117 return "Mercurial" |
|
1118 |
|
1119 def vcsInitConfig(self, project): |
|
1120 """ |
|
1121 Public method to initialize the VCS configuration. |
|
1122 |
|
1123 This method ensures, that an ignore file exists. |
|
1124 |
|
1125 @param project reference to the project (Project) |
|
1126 """ |
|
1127 ignoreName = os.path.join(project.getProjectPath(), Hg.IgnoreFileName) |
|
1128 if not os.path.exists(ignoreName): |
|
1129 self.hgCreateIgnoreFile(project.getProjectPath(), autoAdd=True) |
1116 |
1130 |
1117 def vcsCleanup(self, name): |
1131 def vcsCleanup(self, name): |
1118 """ |
1132 """ |
1119 Public method used to cleanup the working directory. |
1133 Public method used to cleanup the working directory. |
1120 |
1134 |
1988 """ |
2002 """ |
1989 status = False |
2003 status = False |
1990 ignorePatterns = [ |
2004 ignorePatterns = [ |
1991 "glob:.eric5project", |
2005 "glob:.eric5project", |
1992 "glob:_eric5project", |
2006 "glob:_eric5project", |
|
2007 "glob:.eric4project", |
|
2008 "glob:_eric4project", |
1993 "glob:.ropeproject", |
2009 "glob:.ropeproject", |
1994 "glob:_ropeproject", |
2010 "glob:_ropeproject", |
1995 "glob:.directory", |
2011 "glob:.directory", |
1996 "glob:**.pyc", |
2012 "glob:**.pyc", |
1997 "glob:**.pyo", |
2013 "glob:**.pyo", |
1998 "glob:**.orig", |
2014 "glob:**.orig", |
1999 "glob:**.bak", |
2015 "glob:**.bak", |
2000 "glob:**.rej", |
2016 "glob:**.rej", |
2001 "glob:**~", |
2017 "glob:**~", |
|
2018 "glob:cur", |
|
2019 "glob:tmp", |
2002 "glob:__pycache__", |
2020 "glob:__pycache__", |
|
2021 "glob:**.DS_Store", |
2003 ] |
2022 ] |
2004 |
2023 |
2005 ignoreName = os.path.join(name, ".hgignore") |
2024 ignoreName = os.path.join(name, Hg.IgnoreFileName) |
2006 if os.path.exists(ignoreName): |
2025 if os.path.exists(ignoreName): |
2007 res = E5MessageBox.yesNo(self.__ui, |
2026 res = E5MessageBox.yesNo(self.__ui, |
2008 self.trUtf8("Create .hgignore file"), |
2027 self.trUtf8("Create .hgignore file"), |
2009 self.trUtf8("""<p>The file <b>{0}</b> exists already.""" |
2028 self.trUtf8("""<p>The file <b>{0}</b> exists already.""" |
2010 """ Overwrite it?</p>""").format(ignoreName), |
2029 """ Overwrite it?</p>""").format(ignoreName), |