[Top][All Lists]

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

Re: [Gnu-arch-users] Override tagging-method during apply-changeset ?

From: John A Meinel
Subject: Re: [Gnu-arch-users] Override tagging-method during apply-changeset ?
Date: Wed, 20 Apr 2005 17:18:00 -0500
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Martin Langhoff wrote:

I am trying to merge changesets of two branches of the same project
that were 'created' separately, albeit with the same file layout. The
'upstream' project is GForge, which we have a customized version we
are upgrading.

The branch I am merging into uses explicit tagging. I want to suspend
disbelief during my apply-patcheset calls so that it uses names
tagging. No files have been moved or renamed in either branch (or I
can apply those patchsets manually).

As you can see, I have this problem because I didn't have a proper
import into Arch of the original vendor branch. I have one now, and
works cleanly going forward. Given that the 'bad' branch -- the one
without proper history -- is going to be orphaned for good, rebuilding
the repositories to have a single starting/branching point is
something I'd like to avoid. Replaying all this history is going to be
a pain.



This is a pretty tricky request. The problem is that arch uses the
arch-id in order to track what has actually been changed (which allows
for renames, etc). This is in the changeset in the "mod-files-index" file.

Probably the easiest thing to do is to actually write a script which
does a regular diff, and uses that to update the main tree.

Did you do any renaming in your tree? I assume not since you are okay
with using names tagging.
So my recommendation is to do:

tla get original--devo--base-0 base-0
tla get latesttree--devo latest

diff -ur base-0 latest > bigdiff.patch
tla tag -S official--devo--1.0 mynewtree--devo--1.0
tla get mynewtree--devo--1.0 newtree
cd newtree
patch -p1 < ../bigdiff.patch

This has not been tested, but I think it does what you want.

It sumarizes all of your changes from the original branch, and then
applies them to the new tree.

If you want to do this incrementally, you can add a loop over "tla
revisions -f latesttree--devo", and do a commit after each one.

The other "abusive" thing that you can do is to do, is to get the
official tree, temporarily replace all of the .arch_ids/*.id files with
your working ids, apply the changeset, and then replace all of the .id
files back to their official value.
You don't want to commit the intermediate form, but it should fake out
tla into applying the changeset to the correct set of files.

Something like:
tla get $official official-ref
tla get $mytree my-ref
tla get $official official-working
for f in `cd my-ref && find . -path "*.arch_ids*" -name "*.id"`; do mv
-f my-ref/$f official-working/$f; done
cd official-working
tla apply-changeset $whatever_changeset
cd ..
for f in `cd official-ref && find . -path "*.arch_ids*" -name "*.id"`;
do mv -f official-ref/$f official-working/$f; done


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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