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

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

Re: [Gnu-arch-users] [BUG] FEATURE PLANS: delete by limit


From: Bug Goo
Subject: Re: [Gnu-arch-users] [BUG] FEATURE PLANS: delete by limit
Date: Thu, 27 May 2004 18:45:02 +0000

Created as bug 120

On Tue May 25 00:20:39 2004, Tom Lord wrote:
> 
> 
> A seemingly simple idea that turns out to be slightly tricky in
> practice is to find a way to _delete_a_limit_from_a_source_tree_.
> 
> For example, let's suppose that I do a partial commit in some
> directory using a limit called LIMIT.  I would expect that to have a
> specific meaning in terms of "deleting a limit":
> 
>    Given ORIG (the revision before my commit)
>    and   MOD  (the revision after my selected commit)
> 
>    Deleting LIMIT from both ORIG and MOD should leave 
>    identical trees (i.e., nothing outside the limit is
>    effected by the changes).
> 
> 
> An algorithm for deleting things in a LIMIT that seems to give
> appropriate results in combination with a particular definition of
> selective commit is:
> 
> 1) Compute the list of inventory items which match the 
>    limit at all.
> 
> 2) Delete all files and symlinks which match the limit in
>    any way.
> 
> 3) That leaves behind only directories.
> 
>    Each directory was matched by one or more "most specific" rules ---
>    i.e., was matched because of some longest prefix of the directory's
>    location.
> 
>    Let P be the most specific pattern that matched directory D.
>    If there exists a rule whose pattern is _more_specific_ than
>    P _and_ which can exclude items from the limit, then D 
>    is a "left behind directory" and is not deleted.
> 
>    Otherwise, D is recursively deleted.
> 
>    Note that a property of these rules is that no "left behind
>    directory" is ever nested inside of a directory that matched the
>    limit but is not a left behind directory.
> 
>    An example is that with this rule set:
> 
>       (rules (bb "./include"))
> 
>    a directory named "./include" would be recursively deleted but
>    with this one:
> 
>       (rules (bb "./include")
>                (xx "./include/X11"))
> 
>    the rule that matched "./include" is `(bb "./include")'.   
> 
>    The rule `(xx "./include/X11")' is more specific because
>    "./include" is a prefix of "./include/X11".
> 
>    Since a more specific excluding rule ("xx") is present, "./include"
>    is a "left behind directory" --- deleting the limit would delete
>    all of the "./include" subtree _except_ for the "./include/X11"
>    subtree and "./include" itself.
> 
> 
> 
> -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
> 
> 
> 
> _______________________________________________
> Gnu-arch-users mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gnu-arch-users
> 
> GNU arch home page:
> http://savannah.gnu.org/projects/gnu-arch/
> 




reply via email to

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