Mercurial > hg > easyhg
comparison mainwindow.cpp @ 184:1220f26d6f35
* Can edit hgrc even if it doesn't exist yet
| author | Chris Cannam | 
|---|---|
| date | Sun, 19 Dec 2010 19:11:23 +0000 | 
| parents | 01580704de3e | 
| children | 6c15700f4103 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 183:01580704de3e | 184:1220f26d6f35 | 
|---|---|
| 915 | 915 | 
| 916 void MainWindow::changeRemoteRepo() | 916 void MainWindow::changeRemoteRepo() | 
| 917 { | 917 { | 
| 918 // This will involve rewriting the local .hgrc | 918 // This will involve rewriting the local .hgrc | 
| 919 | 919 | 
| 920 QDir hgDir(workFolderPath + "/.hg"); | |
| 921 if (!hgDir.exists()) { | |
| 922 //!!! visible error! | |
| 923 return; | |
| 924 } | |
| 925 | |
| 920 QFileInfo hgrc(workFolderPath + "/.hg/hgrc"); | 926 QFileInfo hgrc(workFolderPath + "/.hg/hgrc"); | 
| 921 if (!hgrc.exists() || !hgrc.isWritable()) { | 927 if (hgrc.exists() && !hgrc.isWritable()) { | 
| 922 //!!! visible error! | 928 //!!! visible error! | 
| 923 return; | 929 return; | 
| 924 } | 930 } | 
| 925 | 931 | 
| 926 MultiChoiceDialog *d = new MultiChoiceDialog | 932 MultiChoiceDialog *d = new MultiChoiceDialog | 
