Chapter 9. Howto End A Branch

“OK, I give up. I do not understand the ending of branches.”

Usually, you end development of a branch the same way you end development of a simple change. In this example, branch example.1.42 will be ended:

% aede -p example 1 -c 42


aegis: project "example.1": change 42: file "fubar" in the baseline
has changed since the last 'aegis -DIFFerence' command, you need to do
a merge

%

Oops. Something went wrong. Don't panic!

I'm going to assume, for the purposes of explanation, that there have been changes in one of the ancestor branches, and thus require a merge, just like file fubar, above.

You need to bring file fubar up-to-date. How? You do it in a change set, like everything else.

At his point you need to do 5 things: (1) create a new change on example.1.42, (2) copy fubar into it, (3) merge fubar with branch "example.1" (4) end development of the change and integrate it, and (5) now you can end example.1.42

The -GrandParent option is a special case of the -BRanch option. You are actually doing a cross-branch merge, just up-and-down rather than sideways.

% aem -gp fubar
%

And manually fix any conflicts... naturally.

At this point, have a look at the file listing, it will show you something you have never seen before - it will show you what it is going to set the branch's edit_number_origin to for each file, at aeipass.

% ael cf
Type   Action Edit        File Name
------ ------ -------     -----------
source modify 1.3         aerect/rect.c
              {cross 1.2}

Now finish the change as usual... aeb, aed, aede, aerpass, aeib, ..., aeipass nothing special here.

One small tip: merge file files one at a time. It makes keeping track of where you are up to much easier.

Now you can end development of the branch, because all of the files are up-to-date.

In some cases, Aegis has detected a logical conflict where you, the human, know there is none. Remember that the aem command saves the old version of the file with a ,B suffix (`B' for backup). If you have a file like this, just use

% mv fubar,B fubar
%

to discard everything from the ancestor branch, and use the current branch.