monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Handling of empty/similar files


From: graydon hoare
Subject: Re: [Monotone-devel] Handling of empty/similar files
Date: 17 Apr 2003 12:30:16 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Sebastien Pierre <address@hidden> writes:

> Hi all,

hello, and welcome!

> I was wondering how Monotone can deal with empty files, or files
> with the same content (same version code). For instance, in Python
> projects it is usual to place empty __init__.py files in each folder
> that represens a module:
> 
> Sources/Package
>  |-- Package
>  |   |-- __init.py__
>  |   |-- Module
>  |       |-- __init__.py
> 
> How does Monotone deal with this kind of files ?

in a design sense, they are treated the same as any other file. a
zero-byte file has a sha1 too. it is:

da39a3ee5e6b4b0d3255bfef95601890afd80709

in terms of implementation, a zero-byte file scans and imports ok, I
just checked. we may discover some logic errors in monotone related to
zero byte files, but those would be bugs.

in general, the storage system only keeps one copy of a particular
version -- more accurately one reconstruction path -- no matter how
many locations in a tree, or how many different tree versions, it
shows up in. the same is true of zero byte files.

there could be an inefficiency due to the storage system storing a
zero-length file at the *end* of a reconstruction chain of reverse
deltas, say if you store a bunch of zero-length files and then modify
one to have content and store it again. if we see this happening
often, and costing a lot, it could be worth some special treatment.

-graydon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]