[Top][All Lists]

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

Re: [Gnu-arch-users] Moving directories to a new branches tree-root (tre

From: Ben Burns
Subject: Re: [Gnu-arch-users] Moving directories to a new branches tree-root (tree root id?)
Date: Sun, 4 Apr 2004 12:15:22 +0200
User-agent: KMail/1.5.4

On Sunday 04 April 2004 10:49, Jan Hudec wrote:
> On Sat, Apr 03, 2004 at 16:28:50 +0200, Ben Burns wrote:
> > Hi,
> >
> > I wanted to find out if the tree root can have an arch id tag like any
> > other file and directory in the source tree. I have heard arch does not
> > use it. If not, how can arch know that a downstream source has moved a
> > directory to the tree-root? So that any file or directory added to the
> > upstream directory would be included in merges in the downstream's tree
> > root.
> >
> > If so, how can you do it,
> >     # tla mv some/dir .
> > obviously wouldn't work (will create dir in the tree root), whereas
> >     # tla mv some/dir/* .
> > will drop upstream additions to dir.
> >
> > On the otherhand
> >     # tla add .
> > does seem to work.
> >
> > I would think that being able move id tagged directories to the root
> > would be useful for splitting large upstream trees into smaller ones
> > buildable with configs.
> There is exactly one tree root in a branch. Thus it can't be moved and
> does not need (nor use) tag. If you mv some/dir/* . you move each file
> in some/dir to ., not some/dir itself.
> If you split large tree to configs, each subtree is _completely
> separate_ from arch's point of view. You can't move files between them
> -- they will be removed from one and added in the other.
> tla add . works simply because it's quite simple-minded.
> > P.S: This didn't get sent yesterday, so I had a chance to think this
> > through a little more. I think the proper way to split a large tree into
> > a smaller one would be to branch the current tree, init-tree in the
> > directory you want using the new branch and make-sync-tree with the new
> > branch. Committing the resulting branch should make the new version
> > updateable (starmergable?) from the big tree without errors. Syncing the
> > big tree with this revision should mean the big tree can starmerge future
> > patches from the small tree too.
> >
> > So, does arch use the id in the tree-root if it exists? Will this work?
> > Some at #arch didn't seem to think so.
> The tree-root is not part of the branch. It's container for the
> checked-out tree. Arch won't (and shouldn't) ever look at it's id.
> However, what you described above should work as expected -- just
> attributes for the directory won't be recorded. But since files will be
> matched by tags no matter what directory they are in, patches will find
> the right place to apply to.

This is what I doubt, let me give an example:
        + --- a/aA/aA.txt
        + --- a/aB/aB.txt
        + --- b/bA/bA.txt
        + --- b/bB/bB.txt

in directories 'a', and 'b' we do tag, init-tree, sync tree, commit to give 
        . (id matches bigtree a)
        + ---   aA/aA.txt
        + ---   aB/aB.txt
        . (id matches bigtree b)
        + ---   bA/bA.txt
        + ---   bB/bB.txt

then in bigtree we commit a patch that changes the tree to:
        + --- a/aA/aA.txt
        + --- a/aC/aC.txt
        + --- a/aB/aB.txt [added]
        + --- b/bA/bA.txt
        + --- b/bB/bB.txt
        + --- b/bC/bC.txt [added]

so, when we then do a subsequent star-merge from bigtree to a-project and 
b-project, I would expect to have:
        + ---   aA/aA.txt
        + ---   aB/aB.txt
        + ---   aC/aC.txt [added]

        + ---   aA/aA.txt
        + ---   aB/aB.txt
        + ---   aC/aC.txt [added]

in, fact, when I star-merge bigtree into a-project, what I actually get is
        + --- a/aC/aC.txt [added to wrong directory]
        + --- aA/aA.txt
        + --- aB/aB.txt
        + --- b/bC/bC.txt [added incorrectly]

if I do an update to split--a-project--0 from bigtree, I get no changes except 
for the addition of the patchlog.

The odd thing is that the id of the a directory in the bigtree is the same as 
the id of the tree-root of the a-project, and I think the reason this is not 
working is that arch is treating the tree-root specially as regards to its 
id.  I don't unsertand why it should be treated differently.

I have an example archive set up at:

which contains the split category described above.  You can try star-merging 
the changes in the bigtree into the a-project branch to replicate the above 

>---- Jan 'Bulb' Hudec <address@hidden>


reply via email to

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