[M3devel] [M3commit] CVS Update: cm3

Olaf Wagner wagner at elegosoft.com
Mon Feb 16 11:36:16 CET 2009


Quoting "Rodney M. Bates" <rodney.bates at wichita.edu>:

> I managed to get the trunk back to the original code, as I intended.
> The Tinderbox failure is undoubtedly a bug in the new stuff.  But it
> leaves me with more CVS questions, see below.
[...]
>>  cvs up -r devel_m3core_text_newtext_branch
>
> This command is in the recipe in my book, but my book assumes you make
> a branch first, get a copy of the trunk code, edit that,  then commit.
> I had done the coding first, naively thinking I could just create a branch
> when ready to commit it.  So I deliberately left this step out, thinking
> (rightly, as it turned out) that it would overlay my work with the
> unmodified code.
>
> So today, I made safe copies in other directories of both versions and
> started trying to unravel things.  Sure enough, the update -r  promptly
> replaced my new code with the old.  I used a different machine to do
> updates, and quickly found I now had the new code in the trunk and the
> old code in the branch.
>
> And of course, update -A first overlaid the old code I had now put in
> my text directory with what is in the repository trunk (the modified
> code), before clearing the sticky tag.
>
> By going through procedures doing CVS commands, interspersed with copying
> versions of the code from my backup directories to the text directory, I
> managed to get the trunk straightened out, (I think.)
>
> But it was convoluted.  To do any of this reasonably, I need a command
> that changes the sticky tag CVS considers me to be working on (like   
> the -r and
> -A options of update), but without the undesired side effect of also
> overlaying my local directory with what was in old tagged version,
> before changing the sticky tag.  Is there such a command?
>
> I will worry about the getting the new code into the branch tomorrow.

You should have switched your workspace to the branch before changing
the code or before the first commit. Then it would have been straight
forward.

The general way to fix things like this is a three-point merge.
You use two -j options to specify the diff to be applied to your
workspace and then commit it (after validating the consistency,
of course).

So yo get the changes from trunk to branch you

  (1) update your workspace to the branch top
      (cvs up -r devel_m3core_text_newtext_branch)

  (2) merge from the branch point to the tag containing you
      changes on the trunk, for example by
      cvs up -j devel_m3core_text_newtext_branch_bp \
             -j erroneously_committed_version_on_trunk
      (I don't know what tag applies here offhand)

AFAIK there is no command to change the workspace sticky tag
without changing the sources.

Regards,

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list