logo       

Re: darcs patch: msg#00003

Subject: Re: darcs patch
On Thu, Jul 01, 2004 at 09:38:56AM -0400, Juliusz Chroboczek wrote:
> 
> David, this is very much open for discussion.  I'll implement minor
> version checking when you agree with the general idea.

I like the concept, but I think the RepoRW/RepoReadonly distinction isn't
likely to be sufficient--it tries to do too much and succeeds at doing too
little.

Oh, and I'd prefer to call it RepoFormat rather than RepoVersion... since
the format should become decoupled from the darcs version as much as
possible.  At least it seems to me that that would be the benefit of
storing the version in the repository.

What I'd like to see (and I haven't figured out how this will work) would
be something where we could (eventually) write to multiple repository
formats AND read from multiple formats.  We may be more likely to be
limited in the formats that we can read from than in those which we can
write to.  In your current scheme, formats we can read from are forced to
be "unknown", which may not be the most useful way of looking at it.

I'm imagining something like an abstract type (i.e. not exported):

data RepoFormat = RepoFormat Int Int [String]

where the first Int indicates the format of the repository as a whole, the
second indicates the set of patch types supported and the [String]
indicates any temporary changes that are supported in the repository
(intended primarily for development releases).

The RepoFormat structure could then be passed around to various functions.
Perhaps functions like write_inventory could check on their own what the
appropriate format is.

This could be used to deal with adding new patch types without breaking
backwards compatibility.  Previously I would implement read support in one
darcs version, and then write support in the next.  We could now implement
both read and write support at once, but unless users update their version
number, they'd not generate the new patch type, so their repository would
remain compatible with the old type.

So we'd need a

can_we_read :: RepoFormat -> Bool

and once smart_diff is able to create different new patch types, we'd need
to introduce a RepoFormat parameter for smart_diff, which would restrict it
to old types if the repo format doesn't allow the new types.

Similarly if replace were implemented now, we could make darcs replace fail
if the repo format doesn't either have "replace" in it's [String] or have a
sufficiently high version number.

And I'm imagining as far as format goes that the [String] would be space
delimited.  Of course, it could be dash-delimited, which would be more
similar to the conventions used with version names.  And in case it wasn't
clear, I'd interperet the [String] parameter as order-independent.
-- 
David Roundy
http://www.abridgegame.org


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe