Mercurial > hg > easyhg
comparison common.h @ 79:aaeabc920ca8
* Some work toward doing the Right Thing with each possible combination of existing/nonexisting directories in Open dialog
author | Chris Cannam |
---|---|
date | Mon, 22 Nov 2010 12:30:40 +0000 |
parents | 07405f3a428b |
children | 1928f9b408e6 |
comparison
equal
deleted
inserted
replaced
78:07405f3a428b | 79:aaeabc920ca8 |
---|---|
48 | 48 |
49 extern QString getUserRealName(); | 49 extern QString getUserRealName(); |
50 | 50 |
51 extern void loseControllingTerminal(); | 51 extern void loseControllingTerminal(); |
52 | 52 |
53 /** | |
54 * Status used in testing whether a folder argument (received from the | |
55 * user) is valid for particular uses. | |
56 */ | |
57 enum FolderStatus { | |
58 FolderUnknown, /// Neither the folder nor its parent exists | |
59 FolderParentExists, /// The folder is absent, but its parent exists | |
60 FolderExists, /// The folder exists and has no .hg repo in it | |
61 FolderHasRepo, /// The folder exists and has an .hg repo in it | |
62 FolderIsFile /// The "folder" is actually a file | |
63 }; | |
64 | |
65 FolderStatus getFolderStatus(QString path); | |
66 | |
67 /** | |
68 * If the given path is somewhere within an existing repository, | |
69 * return the path of the root directory of the repository (i.e. the | |
70 * one with .hg in it). | |
71 * | |
72 * If the given path is _not_ in a repository, or the given path _is_ | |
73 * the root directory of a repository, return QString(). Use | |
74 * getFolderStatus to distinguish between these cases. | |
75 */ | |
76 QString getContainingRepoFolder(QString path); | |
77 | |
78 QString xmlEncode(QString); | |
79 | |
80 | |
53 #endif //COMMON_H | 81 #endif //COMMON_H |
54 | 82 |
55 | 83 |