Mercurial > hg
comparison hgext/purge/__init__.py @ 2381:ab7a438294fc
Rewritten install instructions for hg-purge to match new situation, fixed typos.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 02 Jun 2006 00:28:28 +0200 |
parents | e90cff87f871 |
children | b429566d1994 |
comparison
equal
deleted
inserted
replaced
2380:46ec76f80e18 | 2381:ab7a438294fc |
---|---|
102 # Even on Windows self._repo.dirstate.state() wants '/'. | 102 # Even on Windows self._repo.dirstate.state() wants '/'. |
103 return self._join_path(splitted_path).replace('\\', '/') | 103 return self._join_path(splitted_path).replace('\\', '/') |
104 | 104 |
105 def _split_path(self, path): | 105 def _split_path(self, path): |
106 ''' | 106 ''' |
107 Retruns a list of the single files/directories in "path". | 107 Returns a list of the single files/directories in "path". |
108 For instance: | 108 For instance: |
109 '/home/user/test' -> ['/', 'home', 'user', 'test'] | 109 '/home/user/test' -> ['/', 'home', 'user', 'test'] |
110 'C:\\Mercurial' -> ['C:\\', 'Mercurial'] | 110 'C:\\Mercurial' -> ['C:\\', 'Mercurial'] |
111 ''' | 111 ''' |
112 ret = [] | 112 ret = [] |
142 | 142 |
143 This means that purge will delete: | 143 This means that purge will delete: |
144 - Unknown files: files marked with "?" by "hg status" | 144 - Unknown files: files marked with "?" by "hg status" |
145 - Ignored files: files usually ignored by Mercurial because they match | 145 - Ignored files: files usually ignored by Mercurial because they match |
146 a pattern in a ".hgignore" file | 146 a pattern in a ".hgignore" file |
147 - Empty directories: infact Mercurial ignores directories unless they | 147 - Empty directories: in fact Mercurial ignores directories unless they |
148 contain files under source control managment | 148 contain files under source control managment |
149 But it will leave untouched: | 149 But it will leave untouched: |
150 - Unmodified tracked files | 150 - Unmodified tracked files |
151 - Modified tracked files | 151 - Modified tracked files |
152 - New files added to the repository (with "hg add") | 152 - New files added to the repository (with "hg add") |
154 If directories are given on the command line, only files in these | 154 If directories are given on the command line, only files in these |
155 directories are considered. | 155 directories are considered. |
156 | 156 |
157 Be careful with purge, you could irreversibly delete some files you | 157 Be careful with purge, you could irreversibly delete some files you |
158 forgot to add to the repository. If you only want to print the list of | 158 forgot to add to the repository. If you only want to print the list of |
159 files that this program would delete use the -vn options. | 159 files that this program would delete use the --print option. |
160 ''' | 160 ''' |
161 act = not opts['print'] | 161 act = not opts['print'] |
162 abort_on_err = bool(opts['abort_on_err']) | 162 abort_on_err = bool(opts['abort_on_err']) |
163 eol = opts['print0'] and '\0' or '\n' | 163 eol = opts['print0'] and '\0' or '\n' |
164 if eol == '\0': | 164 if eol == '\0': |