gnu-arch-users
[Top][All Lists]
Advanced

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

RE: [Gnu-arch-users] tla star-merge in cycle, how to work around?


From: Попков Александр
Subject: RE: [Gnu-arch-users] tla star-merge in cycle, how to work around?
Date: Tue, 29 Mar 2005 12:02:06 +0400

John Arbash Meinel wrote:

>You could always have your vsc-merge script check to see if the only
>change is a patch-log, and if so, undo the change. You are right, if you
>have 2 trees star-merging eachother, they continually spiral, since each
>time adds a new patch-log saying that it was merged against the other tree.

For this I must do:

tla get-changeset archive/revision tmp_dir
and check for directories:
 tmp_dir/new-files-archive
 tmp_dir/patches
 tmp_dir/removed-files-archive
doesn't contain anything exclude "{arch}/..."

True? Or exists easier method?

>Just to make sure that you understand, star-merge just updates the local
>working directory. You still have to do a "tla commit" to push the merge
>into the archive.

Yes, I understand this.

>But I think you are saying that you won't allow
>development changes directly committed into the main archive.

Yes. Main archive updated only by arch-pqm, which do
  tla star-merge ...
  ...some checks...
  tla commit ...
in temporary work directory.

No direct commits to main archive possible... Only to local archives...

[...skipped...]

>>What _right_ solution for back-star-merge (from address@hidden/devel to
>>address@hidden/devel) in PROBLEM-POINT in this schema?

>Well, I would probably say *don't*. You can back-star-merge from
>address@hidden/stable, but you probably don't want everything kept up to
>date with address@hidden/devel. Because until the maintainer has decided
>something is stable, you probably don't want to force the changes on
>everyone else.

>I would also say that the PROBLEM-POINT should be taken care of by the
>pqm. The pqm can then inform people when changes have been made that
>they should be aware of.

>I will try to spell out the steps I think:
>
>   1. Developer commits changes to a personal devel archive
>   2. The devel pqm is informed there is a new patch, and tries to merge
>      it against the main devel archive.
>   3. If successful, new patch is committed to main devel. Email is
>      generated to all relevant developers.
>   4. When the maintainer reviews the latest submissions and is happy,
>      he merges them into mainline stable (and commits).
>   5. On commit to the mainline stable, all personal devel archives are
>      updated with the stable patch.
>   6. Developers are encouraged that if they see something they like
>      from the email in step 3 that they can manually pull from main devel.

>The problem I see with this setup, is that arch doesn't handle merging
>between 3-levels of trees very well. I *think* star-merge --three-way
>would do what you want. Since it can ignore changes that are already
>present.

Big thanks for this explanation!

I make the conclusion for myself:
1) vcs-release tell arch-pqm for perform usual star-merge
2) vcs-merge tell arch-pqm for perform three-way star-merge
   (arch-pqm always do usual star-merge(!))
3) after arch-pqm does 'tla star-merge ...' it must check for
   will be merged actual changes or only patch-logs. And do
   'tla commit ...' only if actual changes merged!
4) after arch-pqm does successfully commit to 'stable' or 'devel' branches
   it must send e-mail notify to all related developers
5) I am must write vcs-update wrapper for developers can manually do merge
   from upstream (branches in main archive)
   (approximate algorithm of vcs-update:
     a) takes one argument, 'stable' or 'devel' for indicate from which
        branch doing merge.
     b) create a temporary directory $proj_tmp
     c) get latest revision of project into $proj_tmp
     d) do 'tla changes address@hidden/project--$1--0' in $proj_tmp
     e) if we have _actual_ (not patch-logs) changes> goto point (f)
        else> echo "Up-to-date ;)"; rm -rf $proj_tmp; exit 0
     f) do 'tla star-merge --three-way address@hidden/project--$1--0'
        in $proj_tmp
     g) if have conflicts>
           echo "Please resolve conflicts in $proj_tmp and commit changes"
           exit 1
        else>
           'tla commit -L "automerged from main $1"'
           exit $?
6) I can easily add call 'vcs-update devel' into begin of vcs-merge
   or vcs-commit wrappers, in perforce.

I think is right method. Goes to test this schema...

---
WBR, Alexander Popkov.





reply via email to

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