From ea922d428114ea40177f7f6a6f5e14190dfdd965 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 22 Feb 2012 21:31:55 +0000 Subject: [PATCH] New theory, new metadata --- FORMAT | 25 ++++++++++++++++++++----- THEORY | 19 ++++++++++++++++--- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/FORMAT b/FORMAT index db70358..11b2d6b 100644 --- a/FORMAT +++ b/FORMAT @@ -11,7 +11,15 @@ In-tree, there are metadata files in .topbloke or changes from bases or dependencies: msg patch "commit message" - exist only in tip branch + exists only in tip branch + EDITED BY USER + + patch name of this topbloke patch (plus a newline) + exists in base and tip, identical value + + base commit id of corresponding base B(C) + exists only in tip branch + this is how we tell tip from base commits deps direct dependencies, one per line as either: @@ -19,12 +27,9 @@ In-tree, there are metadata files in .topbloke - exist only in base branch - deleted exists (but empty) if branch is deleted + deleted exists (but empty) if patch is deleted exist only in tip branch - patch- name of this topbloke patch (plus a newline) - exists in base and tip, identical value - topgit- name of the topgit branch that this was imported from and which we should merge from (plus a newline) @@ -47,6 +52,16 @@ In-tree, there are metadata files in .topbloke format as for deps exists in tip and base branches + +ends list of ends E(C,Px+) + format is one line per Px for which E(C,Px+) != { } + the line contains the patch name Px plus + the commit object names for E(C,Px+), + separated by spaces + in the case of tip commits, the commit's patch + is not listed; for these implicitly E(C,Px+) = { C } + always exists in tip and base branches, perhaps as + an empty file + +*- another property that is inherited; it is also safe to: - merge this file as text when merging diff --git a/THEORY b/THEORY index f40a1fc..83de604 100644 --- a/THEORY +++ b/THEORY @@ -15,14 +15,27 @@ COMMIT ANNOTATIONS P(C) Either P s.t. C \elem P - or \bottom meaning \notexists_{P} C \elem P. + or _|_ meaning \notexists_{P} C \elem P. + + { Pi | C \haspatch Pi } + ie the set of included patches For every Px, E(C,Px+) Implicitly for C \elem Pc+, E(C,Pc+) = { C } and this is not annotated explicitly. - Also implicitly for P(C) = \bottom, \forall_{Px} E(C,Px+) = { } + Also implicitly for P(C) = _|_, \forall_{Px} E(C,Px+) = { } and this is also not annotated explicitly. + B(C) + For C \elem P+: B s.t. E(C,P-) = { B } + P(C) = P- or _|_: _|_ + + Of these in principle all except P(C) can be recalculated from the + commit history, but that would involve a complete history scan and in + the case of \haspatch is clearly impractical. At some point we may + provide a checker/sanitiser that recalculates E(C,Px+) and B(C) from + the commit history. + SIMPLE COMMIT make C >1 { A } @@ -104,7 +117,7 @@ CREATE BASE from L, P where - P(L) = Pl+ v P(L) = \bottom + P(L) = Pl+ v P(L) = _|_ P(L) != P(B) E(B,P+) = { } -- 2.30.2