[PATCH 5 of 6] filelog: add support for packing and repacking lwcopy entries

Matt Mackall mpm at selenic.com
Mon Jan 31 17:53:23 CST 2011


On Mon, 2011-01-31 at 11:21 +0100, Sune Foldager wrote:
> # HG changeset patch
> # User Sune Foldager <cryo at cyanite.org>
> # Date 1296295839 -3600
> # Node ID de54bdb29ab2e3ffdca6bd2e26e0e05a5f4f3a7a
> # Parent  b973580739760fc25f971b947864a890abf5eb2c
> filelog: add support for packing and repacking lwcopy entries
> 
> diff --git a/mercurial/filelog.py b/mercurial/filelog.py
> --- a/mercurial/filelog.py
> +++ b/mercurial/filelog.py
> @@ -8,6 +8,8 @@
>  import revlog, mdiff
>  import re
>  
> +from error import LookupError
> +
>  class filelog(revlog.revlog):
>      def __init__(self, opener, path):
>          revlog.revlog.__init__(self, opener,
> @@ -21,9 +23,17 @@
>          return t[s + 2:]
>  
>      def add(self, text, meta, transaction, link, p1=None, p2=None):
> +        origtext = None
>          if meta or text.startswith('\1\n'):
> +            if "copylw" in meta:

This should probably be keyed off the opener options instead. Then the
higher levels can continue to be ignorant of the storage technique.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list