Mercurial > hg
comparison mercurial/localrepo.py @ 10725:00d46934ee35 stable
localrepo: more specific warning on adding large files
With better language as suggested by timeless.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 18 Mar 2010 01:58:26 +0100 |
parents | e930017f9e2a |
children | bedef1c228d3 fe39f0160c74 |
comparison
equal
deleted
inserted
replaced
10710:47fbbc4845ff | 10725:00d46934ee35 |
---|---|
1089 except: | 1089 except: |
1090 self.ui.warn(_("%s does not exist!\n") % f) | 1090 self.ui.warn(_("%s does not exist!\n") % f) |
1091 rejected.append(f) | 1091 rejected.append(f) |
1092 continue | 1092 continue |
1093 if st.st_size > 10000000: | 1093 if st.st_size > 10000000: |
1094 self.ui.warn(_("%s: files over 10MB may cause memory and" | 1094 self.ui.warn(_("%s: up to %d MB of RAM may be required " |
1095 " performance problems\n" | 1095 "to manage this file\n" |
1096 "(use 'hg revert %s' to unadd the file)\n") | 1096 "(use 'hg revert %s' to cancel the " |
1097 % (f, f)) | 1097 "pending addition)\n") |
1098 % (f, 3 * st.st_size // 1000000, f)) | |
1098 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)): | 1099 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)): |
1099 self.ui.warn(_("%s not added: only files and symlinks " | 1100 self.ui.warn(_("%s not added: only files and symlinks " |
1100 "supported currently\n") % f) | 1101 "supported currently\n") % f) |
1101 rejected.append(p) | 1102 rejected.append(p) |
1102 elif self.dirstate[f] in 'amn': | 1103 elif self.dirstate[f] in 'amn': |