Mailing List Archive

Branch cleaning/ archiving
I know Uwe wants to purge some (or all) of the existing branches...
I'm not really fond of removing them - this sort of misses the point
of pushing the full mirror from the old repo.

I do understand the will to clean up, however... Maybe we can tag all
existing branches under a common prefix (archive/lucene-solr/*) and
then delete those branch refs? Would this be fine, Uwe?

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
+1 to tag and remove most if not all branches.

We already did this before, see list of existing tags (git tag -l)

...
history/branches/lucene-solr/lucene_solr_3_1
history/branches/lucene-solr/lucene_solr_3_2
history/branches/lucene-solr/lucene_solr_3_3
history/branches/lucene-solr/lucene_solr_3_4
history/branches/lucene-solr/lucene_solr_3_5
...
history/branches/lucene-solr/starburst
history/branches/lucene-solr/throwawaybranch
history/branches/solr/branch-1.3
...

Jan

> 10. mar. 2021 kl. 20:12 skrev Dawid Weiss <dawid.weiss@gmail.com>:
>
> I know Uwe wants to purge some (or all) of the existing branches...
> I'm not really fond of removing them - this sort of misses the point
> of pushing the full mirror from the old repo.
>
> I do understand the will to clean up, however... Maybe we can tag all
> existing branches under a common prefix (archive/lucene-solr/*) and
> then delete those branch refs? Would this be fine, Uwe?
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
RE: Branch cleaning/ archiving [ In reply to ]
Hi,

we discussed the tagging already on Slack. That was exactly Jan's and my proposal. Can be scripted.

This should mainly done for branches that are definitely outdated. We can for example script this after creating a list of branches that should be removed. We won't loose history, because we have all references still in the repo, we just want to get rid of those to prevent people from doing wrong things: E.g., somebody gets low sugar status and does not know which origin to push to. A "not found" error is better than no longer knowing if branch_8x should live on repo "a" or repo "b"! In addition, if branch does not exist, wrongly configured jenkins jobs wont run!

BTW, we did the same with old branches and tags after the switched from subversion to git. Branches are no longer there, but we still have tags under "history/".

FYI, I purged the "master" branch in the new repos after INFRA changed the HEAD on github and gitbox. If somebody clones our (new) repos, heshe get's "main" by default. Thanks to Infra for manually changing the "HEAD" link on the bare gitbox and Github repos (which survives also branch deletes and would have been detached after master was nuked).

-----
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Dawid Weiss <dawid.weiss@gmail.com>
> Sent: Wednesday, March 10, 2021 8:13 PM
> To: Lucene Dev <dev@lucene.apache.org>
> Subject: Branch cleaning/ archiving
>
> I know Uwe wants to purge some (or all) of the existing branches...
> I'm not really fond of removing them - this sort of misses the point
> of pushing the full mirror from the old repo.
>
> I do understand the will to clean up, however... Maybe we can tag all
> existing branches under a common prefix (archive/lucene-solr/*) and
> then delete those branch refs? Would this be fine, Uwe?
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
> We already did this before, see list of existing tags (git tag -l)

I know, I did it, after all... :) This was a move from subversion
though... slightly different. Anyway - if you guys want to proceed
with this, please go ahead, I don't mind. A spring cleaning is needed
every couple of years... If we just leave the main branch it'll be
very elegant. People work on their local repos these days anyway, it's
not like everyone pollutes the same workspace.

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
On Wed, Mar 10, 2021 at 3:17 PM Dawid Weiss <dawid.weiss@gmail.com> wrote:

> ...People work on their local repos these days anyway, it's
> not like everyone pollutes the same workspace.
>

I very much concur. When I got started with git, I treated it closer to
what I was previously more familiar with and created branches upstream in
the main repo. Now I know better -- I use my fork.

If a branch hasn't received a commit in > 2 years, we might auto-purge them
and do this practice regularly. Before auto-purge, we could even list the
people who last did a commit on the branches to let them know. With that
notification system, even more regular purges would be good.
Re: Branch cleaning/ archiving [ In reply to ]
Ok, I took a stab at this

We have 113 branches. Here is a script I prepared that will work directly on a git remote, first creating the tag then deleting the branch.
https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870

In the script I have added the list of branches that I propose to "archive".

Below that there is a commented section of branches that are reported as "active" by GitHub that should probably stay for now
Finally, we have some branches we might want to keep around for refernce?
I'm not sure how useful it is to keep a branch in solr.git for, say branch_8_8, as it will fall behind as branch_8_8 in lucene-solr.git gets updated. So probably archive those as well?

The pure lucene branches like LUCENE-9004 won't need a tag at all I suppose, but it won't hurt either.

Jan

> 10. mar. 2021 kl. 21:16 skrev Dawid Weiss <dawid.weiss@gmail.com>:
>
>> We already did this before, see list of existing tags (git tag -l)
>
> I know, I did it, after all... :) This was a move from subversion
> though... slightly different. Anyway - if you guys want to proceed
> with this, please go ahead, I don't mind. A spring cleaning is needed
> every couple of years... If we just leave the main branch it'll be
> very elegant. People work on their local repos these days anyway, it's
> not like everyone pollutes the same workspace.
>
> D.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
Any risk in the script that command:
git push ${REMOTE}
cominvent/$BRANCH:refs/tags/history/branches/lucene-solr/$BRANCH
errors out in some exotic way (?) but the script continues anyway and
proceeds with the delete:
git push ${REMOTE} --delete $BRANCH


On Wed, Mar 10, 2021 at 10:35 PM Jan Høydahl <jan.asf@cominvent.com> wrote:

> Ok, I took a stab at this
>
> We have 113 branches. Here is a script I prepared that will work directly
> on a git remote, first creating the tag then deleting the branch.
> https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870
>
> In the script I have added the list of branches that I propose to
> "archive".
>
> Below that there is a commented section of branches that are reported as
> "active" by GitHub that should probably stay for now
> Finally, we have some branches we might want to keep around for refernce?
> I'm not sure how useful it is to keep a branch in solr.git for, say
> branch_8_8, as it will fall behind as branch_8_8 in lucene-solr.git gets
> updated. So probably archive those as well?
>
> The pure lucene branches like LUCENE-9004 won't need a tag at all I
> suppose, but it won't hurt either.
>
> Jan
>
> > 10. mar. 2021 kl. 21:16 skrev Dawid Weiss <dawid.weiss@gmail.com>:
> >
> >> We already did this before, see list of existing tags (git tag -l)
> >
> > I know, I did it, after all... :) This was a move from subversion
> > though... slightly different. Anyway - if you guys want to proceed
> > with this, please go ahead, I don't mind. A spring cleaning is needed
> > every couple of years... If we just leave the main branch it'll be
> > very elegant. People work on their local repos these days anyway, it's
> > not like everyone pollutes the same workspace.
> >
> > D.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
Re: Branch cleaning/ archiving [ In reply to ]
Yep, I updated it with a check that the command succeeded.

Jan

> 10. mar. 2021 kl. 23:09 skrev Ilan Ginzburg <ilansolr@gmail.com>:
>
> Any risk in the script that command:
> git push ${REMOTE} cominvent/$BRANCH:refs/tags/history/branches/lucene-solr/$BRANCH
> errors out in some exotic way (?) but the script continues anyway and proceeds with the delete:
> git push ${REMOTE} --delete $BRANCH
>
>
> On Wed, Mar 10, 2021 at 10:35 PM Jan Høydahl <jan.asf@cominvent.com <mailto:jan.asf@cominvent.com>> wrote:
> Ok, I took a stab at this
>
> We have 113 branches. Here is a script I prepared that will work directly on a git remote, first creating the tag then deleting the branch.
> https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870 <https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870>
>
> In the script I have added the list of branches that I propose to "archive".
>
> Below that there is a commented section of branches that are reported as "active" by GitHub that should probably stay for now
> Finally, we have some branches we might want to keep around for refernce?
> I'm not sure how useful it is to keep a branch in solr.git for, say branch_8_8, as it will fall behind as branch_8_8 in lucene-solr.git gets updated. So probably archive those as well?
>
> The pure lucene branches like LUCENE-9004 won't need a tag at all I suppose, but it won't hurt either.
>
> Jan
>
> > 10. mar. 2021 kl. 21:16 skrev Dawid Weiss <dawid.weiss@gmail.com <mailto:dawid.weiss@gmail.com>>:
> >
> >> We already did this before, see list of existing tags (git tag -l)
> >
> > I know, I did it, after all... :) This was a move from subversion
> > though... slightly different. Anyway - if you guys want to proceed
> > with this, please go ahead, I don't mind. A spring cleaning is needed
> > every couple of years... If we just leave the main branch it'll be
> > very elegant. People work on their local repos these days anyway, it's
> > not like everyone pollutes the same workspace.
> >
> > D.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org <mailto:dev-unsubscribe@lucene.apache.org>
> > For additional commands, e-mail: dev-help@lucene.apache.org <mailto:dev-help@lucene.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org <mailto:dev-unsubscribe@lucene.apache.org>
> For additional commands, e-mail: dev-help@lucene.apache.org <mailto:dev-help@lucene.apache.org>
>
Re: Branch cleaning/ archiving [ In reply to ]
This will also require people who already made their clones/ forks to
prune their copy of the remote as this isn't done automatically.

git remote prune origin

Other than that -- looks good to me.

D.

On Wed, Mar 10, 2021 at 11:19 PM Jan Høydahl <jan.asf@cominvent.com> wrote:
>
> Yep, I updated it with a check that the command succeeded.
>
> Jan
>
> 10. mar. 2021 kl. 23:09 skrev Ilan Ginzburg <ilansolr@gmail.com>:
>
> Any risk in the script that command:
> git push ${REMOTE} cominvent/$BRANCH:refs/tags/history/branches/lucene-solr/$BRANCH
> errors out in some exotic way (?) but the script continues anyway and proceeds with the delete:
> git push ${REMOTE} --delete $BRANCH
>
>
> On Wed, Mar 10, 2021 at 10:35 PM Jan Høydahl <jan.asf@cominvent.com> wrote:
>>
>> Ok, I took a stab at this
>>
>> We have 113 branches. Here is a script I prepared that will work directly on a git remote, first creating the tag then deleting the branch.
>> https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870
>>
>> In the script I have added the list of branches that I propose to "archive".
>>
>> Below that there is a commented section of branches that are reported as "active" by GitHub that should probably stay for now
>> Finally, we have some branches we might want to keep around for refernce?
>> I'm not sure how useful it is to keep a branch in solr.git for, say branch_8_8, as it will fall behind as branch_8_8 in lucene-solr.git gets updated. So probably archive those as well?
>>
>> The pure lucene branches like LUCENE-9004 won't need a tag at all I suppose, but it won't hurt either.
>>
>> Jan
>>
>> > 10. mar. 2021 kl. 21:16 skrev Dawid Weiss <dawid.weiss@gmail.com>:
>> >
>> >> We already did this before, see list of existing tags (git tag -l)
>> >
>> > I know, I did it, after all... :) This was a move from subversion
>> > though... slightly different. Anyway - if you guys want to proceed
>> > with this, please go ahead, I don't mind. A spring cleaning is needed
>> > every couple of years... If we just leave the main branch it'll be
>> > very elegant. People work on their local repos these days anyway, it's
>> > not like everyone pollutes the same workspace.
>> >
>> > D.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> > For additional commands, e-mail: dev-help@lucene.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
I thought a simple git fetch would detect deleted branches?
Probably wise to send a mail to separate mail to dev@

-------------
Subject: [NOTICE] All branches will be gone on Monday

We plan to remove up all historic branches in the new solr.git repostiory, and leave
only the "main" branch. We'll do this by replacing the branch with a git tag, e.g.
branch_8x will be replaced with tag history/branches/lucene-solr/branch_8x.
This is the same procedure we did when moving from svn to git. No history is lost!

We encourage all committers to work on features in feature branches in your
private git fork instead of pushing your branches to the central repository.
For larger collaborative efforts like reference_branch and refactorings, it's ok
to use central branches.

Should you have a work-in-progress on a central feature branch, such as an
active PR against lucene-solr.git, please push the PR branch to your private
fork and re-create the PR in new repo using the private branch. All PRs will
need to be re-created anyway so this is a small extra step.

If you are aware of branches that should stay central, other than
reference_impl_dev and reference_impl, please reply to this email.

The removal of these branches will happen on Monday March 15th.
After the removal you will need to run "git remote prune origin"

PS: The lucene-solr.git repo, where 8.x development continues, will not be affected.

-------------

> 11. mar. 2021 kl. 07:47 skrev Dawid Weiss <dawid.weiss@gmail.com>:
>
> This will also require people who already made their clones/ forks to
> prune their copy of the remote as this isn't done automatically.
>
> git remote prune origin
>
> Other than that -- looks good to me.
>
> D.
>
> On Wed, Mar 10, 2021 at 11:19 PM Jan Høydahl <jan.asf@cominvent.com> wrote:
>>
>> Yep, I updated it with a check that the command succeeded.
>>
>> Jan
>>
>> 10. mar. 2021 kl. 23:09 skrev Ilan Ginzburg <ilansolr@gmail.com>:
>>
>> Any risk in the script that command:
>> git push ${REMOTE} cominvent/$BRANCH:refs/tags/history/branches/lucene-solr/$BRANCH
>> errors out in some exotic way (?) but the script continues anyway and proceeds with the delete:
>> git push ${REMOTE} --delete $BRANCH
>>
>>
>> On Wed, Mar 10, 2021 at 10:35 PM Jan Høydahl <jan.asf@cominvent.com> wrote:
>>>
>>> Ok, I took a stab at this
>>>
>>> We have 113 branches. Here is a script I prepared that will work directly on a git remote, first creating the tag then deleting the branch.
>>> https://gist.github.com/80a7eea6bacd4e32646a7958d1e9a870
>>>
>>> In the script I have added the list of branches that I propose to "archive".
>>>
>>> Below that there is a commented section of branches that are reported as "active" by GitHub that should probably stay for now
>>> Finally, we have some branches we might want to keep around for refernce?
>>> I'm not sure how useful it is to keep a branch in solr.git for, say branch_8_8, as it will fall behind as branch_8_8 in lucene-solr.git gets updated. So probably archive those as well?
>>>
>>> The pure lucene branches like LUCENE-9004 won't need a tag at all I suppose, but it won't hurt either.
>>>
>>> Jan
>>>
>>>> 10. mar. 2021 kl. 21:16 skrev Dawid Weiss <dawid.weiss@gmail.com>:
>>>>
>>>>> We already did this before, see list of existing tags (git tag -l)
>>>>
>>>> I know, I did it, after all... :) This was a move from subversion
>>>> though... slightly different. Anyway - if you guys want to proceed
>>>> with this, please go ahead, I don't mind. A spring cleaning is needed
>>>> every couple of years... If we just leave the main branch it'll be
>>>> very elegant. People work on their local repos these days anyway, it's
>>>> not like everyone pollutes the same workspace.
>>>>
>>>> D.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: dev-help@lucene.apache.org
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Branch cleaning/ archiving [ In reply to ]
> I thought a simple git fetch would detect deleted branches?

I don't think fetch purges remote refs... Unless something has changed
from the last time I did such an operation.

I like your e-mail.

> The removal of these branches will happen on Monday March 15th.
> After the removal you will need to run "git remote prune origin"

This is an alternative that runs a fetch, followed by a prune.

git fetch --prune origin

D.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org