gnu-arch-users
[Top][All Lists]
Advanced

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

[Gnu-arch-users] FEATURE PLANS: selected commit


From: Tom Lord
Subject: [Gnu-arch-users] FEATURE PLANS: selected commit
Date: Mon, 24 May 2004 16:57:35 -0700 (PDT)


Selections name subsets of a tree, coloring elements of that subset as
interesting for "names only", "contents", or "both".

Given an ORIG and MOD tree, along with a SELECTIONS, we (usually) know how
to make a third tree, TARGET, which is a good answer to the question
"what does `like ORIG but with the changes from MOD that occur within
SELECTION' mean?"

The answer is:

        TARGET = The overlay within SELECTION of MOD onto ORIG.

using the definition of "overlay" from the previous message.

Semantically, selected commit is very easy, therefore:

        ORIG := the immediate ancestor of the commit

        MOD := the user's working dir

        SELECTION := the user's specified selection

        TARGET := overlay (SELECTION, MOD, ORIG)

        commit TARGET

        replace patch-log of MOD with patch-log of post-commit TARGET

        replace auto-changelogs of MOD with patch-logs from TARGET

Implementation-wise, I believe we can compute the contents of TARGET 
in-core, prior to invoking the normal `commit' logic, and then fairly
trivially use the `vu_' layer to fake out `commit' into thinking that
TARGET actually exists on disk.

I realize that the post with the "overlay" algorithm is tediously
detailed but let me point out one nice feature of it for selective
commit: it can give very clear error messages about why a proposed
selective commit doesn't make sense (e.g,. for half-included renames).


-t

----

Like my work on GNU arch, Pika Scheme, and other technical contributions 
to the public sphere?   Show your support!

https://www.paypal.com/xclick/business=lord%40emf.net&item_name=support+for+arch+and+other+free+software+efforts+by+tom+lord&no_note=1&tax=0&currency_code=USD

and

address@hidden for www.moneybookers.com payments.


-----

        The cause of death is birth.
                        -- George Harrison





reply via email to

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