From e7a04f5c030191f438b9556cd0701d1cd4950589 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 28 Jan 2012 15:35:07 +0000 Subject: [PATCH] Some thoughts --- BUGS | 10 ++++++++-- DESIGN | 29 ++++++++++++++++++----------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/BUGS b/BUGS index 14a4a13..df77a9f 100644 --- a/BUGS +++ b/BUGS @@ -1,10 +1,16 @@ merge alg needs to check for cyclic dependencies +when creating needs to remove metadata, make a separate commit with no +metadata to allow us to spot what's happening. should only do this +with option to permit it! Also need to do this when merging. + wibblings: what about strangeness in ancient history wrt merge alg topgit import - topbloke {base,tip} is ff desc of topgit {base,tip} - with metadata adjusted + topbloke {base,tip} is ff desc of topgit {base,tip} + with metadata adjusted + reject topbloke imports of topgit branches which + also contain topbloke metadata need patch name in metadata patch dep metadata syntax unsatisfactory: too twiddly flags metadata unsatisfactory: wants to be valued properties diff --git a/DESIGN b/DESIGN index b7c677d..a7c142b 100644 --- a/DESIGN +++ b/DESIGN @@ -19,7 +19,7 @@ Basic update algorithm: - the branch for each direct dep - the remote base) - Find the common ancestor. + Find the (latest) common ancestor. Check for unwanted dependency removals. An unwanted dependency removal is @@ -30,14 +30,23 @@ Basic update algorithm: which have already occurred on our base; these will be reverted later.) For each unwanted dependency removal (ie for each such - branch), find the most recent commit which unwantedly removed - the dep from the source's actual included deps ("relevant - unwanted removal commit"). (Abort if any such commit is a - merge.) Select the earliest relevant unwanted removal commit - (from the set of relevant unwanted removal commits - corresponding to the unwanted dependency removals). - Merge from the ancestor of the relevant unwanted removal commit. - Merge from the relevant unwanted removal commit using -s ours. + branch), search as follows: + * An "unwanted removal commit" is a non-merge commit in the + history of the source, which unwantedly removes the dep + from the actual included deps. + * But the search stops at any point where we would have to + traverse a commit where .topbloke/deps is empty (which + stops us looking into the hitory of non-topbloke-controlled + branches). This can be done with git-rev-list + --remove-empty. + * The the relevant unwanted removal commit for that dep is + the most recent unwanted removal commit, as defined. + Select the unwantedly removed dep whose relevant unwanted + removal commit is the earliest. Merge from the ancestor of + that relevant unwanted removal commit. Merge from the relevant + unwanted removal commit using -s ours. + + Now continue to the next unwanted dependency removal. (The purpose of this, and the result, is that the unwanted dependency removal has gone away. Doing things in this order @@ -48,8 +57,6 @@ Basic update algorithm: of a patch affected by an unwanted removal will benefit from that client's resolution of the situation.) - Now continue to the next unwanted dependency removal. - If there are no (more) unwanted dependency removals, merge from the source. -- 2.30.2