[petsc-dev] git : list branches started off maint - but not yet merged back

Jed Brown jedbrown at mcs.anl.gov
Thu Aug 29 22:21:23 CDT 2013

Satish Balay <balay at mcs.anl.gov> writes:

> You mean - this is looking for all branches that started off a 'maint'
> commit [which is currently in master] - and also its head is merged
> into master aswell?


> fatal: Not a valid object name ~1
> usage: git merge-base [-a|--all] <commit> <commit>...
>    or: git merge-base [-a|--all] --octopus <commit>...
>    or: git merge-base --independent <commit>...
>    or: git merge-base --is-ancestor <commit> <commit>
>     -a, --all             output all common ancestors
>     --octopus             find ancestors for a single n-way merge
>     --independent         list revs not reachable from others
>     --is-ancestor         is the first one ancestor of the other?

Sorry, here's an update.

  candidate-branches () {
    git for-each-ref --shell --format 'branch=%(refname) date=%(committerdate)' refs/remotes/origin | while read entry
      eval "$entry"
      git merge-base --is-ancestor $branch $merged || continue
      git merge-base --is-ancestor $branch $dest && continue
      merge_point=$(git rev-list --ancestry-path --reverse $branch..$merged | head -1)
      test -n "$merge_point" || continue
      start=$(git merge-base $branch ${merge_point}~1)
      # echo Testing branch $branch merge_point $merge_point start $start
      git merge-base --is-ancestor $start $dest || continue
      echo Candidate for $dest: $branch $date

>> Candidate for maint: refs/remotes/origin/balay/fix-deadlock-on-bgq Wed Aug 28 11:57:58 2013 -0500
>> Candidate for maint: refs/remotes/origin/balay/fix-scalapack-mpiinc Thu Jul 4 14:31:22 2013 -0500
> These two are already merged into maint. Are they listed because you
> haven't done a 'git fetch' in a while? Also perhaps its better to use
> 'candidate-branches origin/master origin/maint'?

Yeah, that's all it was.

> This is a big list. Perhaps everyone can comment if they should be merged into maint..
> [added in a couple more lines to get the list of oustanding commits in
> that branch - I see 'karlrupp/feature-viennacl' and a few others are
> false positives..]

It's not a false positive because that branch starts exactly at v3.4.
Semantically, it does not make sense to merge to 'maint', but
topologically, it's still a candidate.

> <<<<<<
>     git log --oneline $dest..$branch  | cat
>     echo
> <<<<<<
> $ candidate-branches master maint
> Candidate for maint: refs/remotes/origin/barry/petscdatatypefromstring Fri Aug 23 21:12:13 2013 -0500
> 8e4b2d1 Sys: add PetscDataTypeFromString() and test code
> Candidate for maint: refs/remotes/origin/jed/fix-gamg-coarse Wed May 29 22:29:42 2013 -0500
> 248bfaf PCBJacobi: call KSPSetFromOptions(subksp) when PCSetUp was called first
> 5b42dca PCGAMG: set bjacobi->same_local_solves=TRUE to clean coarse grid viewing

I think this can merge.

> Candidate for maint: refs/remotes/origin/jed/fix-viewer-ascii-tab-whitespace Wed Jun 19 09:19:55 2013 +0200
> 17c4b54 Viewer ASCII: print tabs to petsc_history, not fd

Should merge.  (Bitbucket is down so I'm not doing it now.  You're
welcome to.)

> Candidate for maint: refs/remotes/origin/jed/is-view-from-options Sun Aug 25 01:10:01 2013 -0500
> 817ea41 AO: fix erroneous processing of -ao_view and factor into AOViewFromOptions
> dba0e79 doc: fix named argument in {Vec,Mat,DM}ViewFromOptions

Should merge.

> Candidate for maint: refs/remotes/origin/jed/mat-factor-shift Sat Jun 1 12:23:49 2013 -0500
> 5e9742b Mat PCFactor: include MatFactorShiftType in PCView_Factor output

I don't care whether this merges.  It changes output which is
unattractive, but it's harmless and the output is more useful.

> Candidate for maint: refs/remotes/origin/jed/pcmg-residual-underscore Wed Jun 26 16:22:39 2013 -0500
> 21b6e91 PCMGResidualDefault: fix fortran def [error on windows build]
> 54b2cd4 PCMGResidualDefault: deprecate old semi-private name and make public

NOT a candidate.  The first of three commits went to 'maint', but the
others should not.

> Candidate for maint: refs/remotes/origin/toby/ksp-dgmres-view Tue Jun 4 06:20:21 2013 -0500
> e788a01 dgmres: doc for -ksp_dgmres_view_deflation_vecs
> 9d49465 dgmres: added option to view deflation vecs after solve.
> 62aa035 dgmres: fix real typed as int

Okay to merge.

> Candidate for maint: refs/remotes/origin/toby/pcfactorgetlevels Fri Jun 7 14:20:33 2013 -0500
> 2591b31 PCFactor: add PCFactorGetLevels

Okay to merge, but PCDestroy_XXX should also be _clearing_ out its
composed functions.  None of them are cleared here, so it's okay that
this commit doesn't clear its.

> Candidate for maint: refs/remotes/origin/toby/pcgamg-rebuild-coarse Wed Jul 24 16:12:18 2013 -0500
> 0a97e77 PCGAMG: Always rebuild coarse Mat the first time

I haven't heard about any bugs related to this, so I think it should be
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130829/12123417/attachment.sig>

More information about the petsc-dev mailing list