Uniquely identifying each & every html template

Chris Angelico rosuav at gmail.com
Tue Jan 22 01:04:37 CET 2013

On Tue, Jan 22, 2013 at 10:43 AM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> On 21 January 2013 23:01, Tom P <werotizy at freent.dd> wrote:
>> On 01/21/2013 01:39 PM, Oscar Benjamin wrote:
>>> This is a very old problem (still unsolved I believe):
>>> http://en.wikipedia.org/wiki/Ship_of_Theseus
>> That wiki article gives a hint to a poosible solution -use a timestamp to
>> determine which key is valid when.
> In the Ship of Theseus, it is only argued that it is the same ship
> because people were aware of the incremental changes that took place
> along the way. The same applies here: if you don't track the
> incremental changes and the two files have nothing concrete in common,
> what does it mean to say that a file is "the same file" as some older
> file?
> That being said, I've always been impressed with the way that git can
> understand when I think that a file is the same as some older file
> (though it does sometimes go wrong):

Yeah, git's awesome like that :) It looks at file similarity, though,
so if you completely rewrite a file and simultaneously rename/move it,
git will lose track of it. And as you say, sometimes it gets things
wrong - if you merge a large file into a small one, git will report it
as a deletion and rename. (Of course, it doesn't make any difference.
It's just a matter of reporting.) Mercurial, if I understand
correctly, actually _tracks_ moves (and copies), but git just records
a deletion and a creation.

My family in fact has a literal "grandfather's axe" (except that I
don't think either of my grandfathers actually owned it, but it's my
Dad's old axe) that has had many new handles and a couple of new
heads. Bringing it back to computers, we have on our network two
computers "Stanley" and "Ollie" that have been there ever since we
first set up that network. Back then, it was coax cable, 10base2, no
routers/switches/etc, and the computers were I think early Pentiums.
We installed the database on one of them, and set the other in Dad's
office. Today, we have a modern Ethernet setup with modern hardware
and cat-5 cable; we still have Stanley with the database and Ollie in
the office. The name/identity of the computer is mostly associated
with its roles; but those roles can shift too (there was a time when
Ollie was the internet gateway, but that's no longer the case).
Identity is its own attribute.

The problem isn't that identity can't exist. It's that it can't be
discovered. That takes external knowledge. Dave's analogy is accurate.


More information about the Python-list mailing list