[PATCH stable] localrepo: more specific warning on adding large files
Matt Mackall
mpm at selenic.com
Wed Mar 17 17:41:53 CDT 2010
On Tue, 2010-03-16 at 10:45 +0100, Martin Geisler wrote:
> # HG changeset patch
> # User Martin Geisler <mg at lazybytes.net>
> # Date 1268732659 -3600
> # Branch stable
> # Node ID 4548abc10fbc0009bbb3bd758cb7c006a204255c
> # Parent cfc89fecfe51b21cb26c08268ae64acd2bb0c856
> localrepo: more specific warning on adding large files
I like it.
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -1091,10 +1091,10 @@
> rejected.append(f)
> continue
> if st.st_size > 10000000:
> - self.ui.warn(_("%s: files over 10MB may cause memory and"
> - " performance problems\n"
> + self.ui.warn(_("%s: you will now need at least %d MB "
> + "of RAM to work with this repository\n"
> "(use 'hg revert %s' to unadd the file)\n")
> - % (f, f))
> + % (f, 3 * st.st_size // 1000000, f))
Let me commence the bikeshedding:
"%s: up to %d MB of RAM may be required to manage this file"...
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list