Close some older branches in mozilla-central

RESOLVED FIXED

Status

P3
normal
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: sdwilsh, Assigned: sdwilsh)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [automation])

(Assignee)

Description

9 years ago
The output of |hg heads| is getting long these days.  I'd like to close older branches that we no longer need (like 1.9.1a3 relbranch for instance) and will no longer land anything on.  Ideally, releng could close release branches when they are done with them as well so we don't have to do this every so often.

It was suggested by bsmedberg that I file this bug before we do this to make sure this won't break any automation.  I'd be happy to push the changes to close all of the 1.9.1 and 1.9.2 release branches on mozilla-central as long as it won't break anything.
Sounds like a great idea. For best results, merge the closing cset. Some things in hg are O(topological heads), so having fewer heads is a good idea.
Dirkjan, do you know if older clients will choke in any way on closed branches? Some build machines still use Mercurial 1.1.
It's just a field in the changeset metadata; they won't notice it, they certainly shouldn't choke on it AFAIK.
(In reply to comment #3)
> It's just a field in the changeset metadata; they won't notice it, they
> certainly shouldn't choke on it AFAIK.

sdwilsh: you can consider this your go-ahead from us. Re-assigning to you.
Assignee: nobody → sdwilsh
Priority: -- → P3
Whiteboard: [automation]
sdwilsh: 

1) can you detail what exact commands you were planning on running on m-c? We can try these same in staging in case there are any production concerns.

2) we're also interested in trimming extra heads from tryserver repo. If your proposal for m-c also works on tryserver repo without causing problems, it would allow us to keep tryserver repo neat, and hence more performant! (For now, our workaround is to manually delete-and-recreate the tryserver repo. Big hammer, but it works.)
OS: Windows 7 → All
(Assignee)

Comment 6

8 years ago
(In reply to comment #5)
> 1) can you detail what exact commands you were planning on running on m-c? We
> can try these same in staging in case there are any production concerns.
For example, to remove our oldest head (c4ebfef7afa6):
hg update -r c4ebfef7afa6
hg commit --close-branch -m "Closing old branch"

In comment 1, djc also suggests merging back to tip, but we haven't done that in the past.  Some people may not like that either as it could certainly make history a little more complicated, so I'd probably avoid that for now.  We can always do that in the future.

> 2) we're also interested in trimming extra heads from tryserver repo. If your
> proposal for m-c also works on tryserver repo without causing problems, it
> would allow us to keep tryserver repo neat, and hence more performant! (For
> now, our workaround is to manually delete-and-recreate the tryserver repo. Big
> hammer, but it works.)
It would certainly help, and keeping the heads around doesn't benefit us at all on try server.  On try, merging to tip wouldn't hurt either (I suspect the number of heads is what really hurts us there.
(Assignee)

Comment 7

8 years ago
OK, I've done this locally.  New hg heads output:
changeset:   61898:c1523d3f7841
tag:         tip
parent:      61890:9c815db836e3
user:        Chris Jones <jones.chris.g@gmail.com>
date:        Thu Feb 03 13:54:10 2011 -0600
summary:     Rollup of bug 615386, parts 1-6. Teach the reftest harness about <browser remote>. r=dbaron,roc,ted a=a

changeset:   61897:76521b9cdb59
branch:      GECKO20b11_2011020209_RELBRANCH
parent:      61896:be22ea0c325f
parent:      61895:086d21e38a57
user:        Christian Legnitto <clegnitto@mozilla.com>
date:        Thu Feb 03 10:30:29 2011 -0800
summary:     Backed out due to bug 631225, a=LegNeato

changeset:   61352:e3c72c59c09a
branch:      GECKO20b11pre_20110126_RELBRANCH
user:        ffxbld
date:        Wed Jan 26 14:37:07 2011 -0800
summary:     Added tag FENNEC_4_0b4_RELEASE for changeset 7905eefc489d. CLOSED TREE a=release

changeset:   61123:daecedbdcd10
branch:      GECKO20b10_2011012115_RELBRANCH
user:        ffxbld
date:        Fri Jan 21 15:40:19 2011 -0800
summary:     Added tag FIREFOX_4_0b10_BUILD1 for changeset bb9089ae2322. CLOSED TREE a=release

changeset:   60615:3e8e6ed98b9f
branch:      COMM2000_20110114_RELBRANCH
user:        tbirdbld
date:        Fri Jan 14 14:00:48 2011 -0800
summary:     Added tag THUNDERBIRD_3_3a2_RELEASE for changeset f24f049857a5. CLOSED TREE a=release


This is what I'm changing (hg out):
comparing with ssh://hg.mozilla.org/mozilla-central
searching for changes
changeset:   61754:d799e0529ac6
branch:      GECKO191b1_20081007_RELBRANCH
parent:      20102:c4ebfef7afa6
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:51:44 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61755:fa571a7a6a1e
branch:      FENNEC_A1_BRANCH
parent:      20482:cab97aca485d
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:52:34 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61756:16ff8fc5362f
branch:      GECKO191b2_20081125_RELBRANCH
parent:      25666:b42a1594f613
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:53:06 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61757:ad21235547c0
branch:      GECKO192a1_20090806_RELBRANCH
parent:      31198:dc02eff6d8c0
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:54:18 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61758:fc0787d7c9c1
branch:      GECKO193a1_20100208_RELBRANCH
parent:      37981:9123383e3435
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:55:50 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61759:2886f78c105a
branch:      GECKO193a2_20100228_RELBRANCH
parent:      38795:f99378d9da4e
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:56:15 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61760:a608ba89e49d
branch:      GECKO193a3_20100315_RELBRANCH
parent:      39454:249428fdc4a8
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:56:34 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61761:d8d2a10a8572
branch:      COMM193a4_20100510_RELBRANCH
parent:      42110:9e8e63449a95
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:57:34 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61762:62bd36d202ed
branch:      GECKO193a4_20100407_RELBRANCH
parent:      40543:d26d9a47e3e0
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 11:58:46 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61763:9b3dd92ccff4
branch:      GECKO193a5_20100610_RELBRANCH
parent:      44125:b2f99ae0f07f
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:01:36 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61764:6910fa5cbb3c
branch:      COMM193a5_20100623_RELBRANCH
parent:      46406:5609120be1aa
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:02:03 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61765:bc5188a32f31
branch:      GECKO20b2_20100720_RELBRANCH
parent:      47992:1e5c5e5f8278
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:02:46 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61766:2b138e7791e5
branch:      GECKO20b1_20100628_RELBRANCH
parent:      46452:14664937950a
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:03:23 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61767:4307d141e63a
branch:      COMM20b4_20100815_RELBRANCH
parent:      50729:1ff48562d5cf
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:04:08 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61768:19655f2f9f78
branch:      GECKO20b3_20100804_RELBRANCH
parent:      50734:3e8946d7bdda
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:04:47 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61769:5d64141b7750
branch:      GECKO20b4_20100817_RELBRANCH
parent:      50828:c191cbe08597
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:05:09 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61770:c64d97a1ebd7
branch:      GECKO20b5pre_20100820_RELBRANCH
parent:      51476:fee27ba0b224
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:05:30 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61771:35056c98e719
branch:      GECKO20b5_20100831_RELBRANCH
parent:      53790:501ccdddbded
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:06:06 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61772:2089ef52646d
branch:      GECKO20b7pre_20100929_RELBRANCH
parent:      55013:3c4e0c10b90a
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:06:43 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61773:b9d28b104098
branch:      GECKO20b7pre_20101006_RELBRANCH
parent:      56500:84a97df0878c
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:07:11 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61774:5b9b74ab35f3
branch:      GECKO20b7pre_20101029_RELBRANCH
parent:      56846:4665267772db
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:08:17 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61775:8c455c8c43cf
branch:      GECKO20b7_20101104_RELBRANCH
parent:      56857:c0a8f2fd7d80
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:08:39 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61776:be8185869ee2
branch:      COMM2000_20101116_RELBRANCH
parent:      57600:65c2eb504227
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:09:27 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61777:925fbad25823
branch:      GECKO20b8_20101214_RELBRANCH
parent:      59594:7d3065c9bfad
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:10:20 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

changeset:   61778:ddf00cef28a3
branch:      GECKO20b9_2011011018_RELBRANCH
parent:      60268:cd72d71311c4
user:        Shawn Wilsher <me@shawnwilsher.com>
date:        Thu Feb 03 12:11:38 2011 -0800
summary:     closing old branch that is no longer used per bug 611030

Comment 8

8 years ago
Is this something we could automate?
(In reply to comment #8)
> Is this something we could automate?

I bet we could!
(Assignee)

Comment 10

8 years ago
(In reply to comment #8)
> Is this something we could automate?
I'd say that every time we make a new release branch, we can close the last one for a product.

http://hg.mozilla.org/mozilla-central/rev/d799e0529ac6
http://hg.mozilla.org/mozilla-central/rev/fa571a7a6a1e
http://hg.mozilla.org/mozilla-central/rev/16ff8fc5362f
http://hg.mozilla.org/mozilla-central/rev/ad21235547c0
http://hg.mozilla.org/mozilla-central/rev/fc0787d7c9c1
http://hg.mozilla.org/mozilla-central/rev/2886f78c105a
http://hg.mozilla.org/mozilla-central/rev/a608ba89e49d
http://hg.mozilla.org/mozilla-central/rev/d8d2a10a8572
http://hg.mozilla.org/mozilla-central/rev/62bd36d202ed
http://hg.mozilla.org/mozilla-central/rev/9b3dd92ccff4
http://hg.mozilla.org/mozilla-central/rev/6910fa5cbb3c
http://hg.mozilla.org/mozilla-central/rev/bc5188a32f31
http://hg.mozilla.org/mozilla-central/rev/2b138e7791e5
http://hg.mozilla.org/mozilla-central/rev/4307d141e63a
http://hg.mozilla.org/mozilla-central/rev/19655f2f9f78
http://hg.mozilla.org/mozilla-central/rev/5d64141b7750
http://hg.mozilla.org/mozilla-central/rev/c64d97a1ebd7
http://hg.mozilla.org/mozilla-central/rev/35056c98e719
http://hg.mozilla.org/mozilla-central/rev/2089ef52646d
http://hg.mozilla.org/mozilla-central/rev/b9d28b104098
http://hg.mozilla.org/mozilla-central/rev/5b9b74ab35f3
http://hg.mozilla.org/mozilla-central/rev/8c455c8c43cf
http://hg.mozilla.org/mozilla-central/rev/be8185869ee2
http://hg.mozilla.org/mozilla-central/rev/925fbad25823
http://hg.mozilla.org/mozilla-central/rev/ddf00cef28a3
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Okay, I'll reiterate one last time that it would be a good idea to also "merge" these (not actually merging the code, but getting rid of the topological heads). Protocol operations (incoming, outgoing, pull, push) are going to grow slower as the number of heads increases, and merging these closed heads is the easiest way to combat that (a number of other things, notably tag finding, also finds all the heads, but it has a fairly good cache so that it's less of a problem).
Fwiw, see http://mercurial.selenic.com/wiki/PruningDeadBranches:

"1. Closing branches": what we do in this bug, and should do from now on :-)

(In reply to comment #11)
> it would be a good idea to also "merge"
> these (not actually merging the code, but getting rid of the topological
> heads).

"2. No-Op Merges": what you propose, but there seems to be pros and cons :-|
"3. Using clone": would be better, but we don't actually want to swap trunk (public) repositories, do we? :-(

(In reply to comment #5)
> 2) we're also interested in trimming extra heads from tryserver repo.

"4. Using strip": can't do that on public repo., but might be just fine for tryserver repository :-)
As in stripping older heads at the same time older ftp directories are removed.
(In reply to comment #12)
> "1. Closing branches": what we do in this bug, and should do from now on :-)
> 
> "4. Using strip": can't do that on public repo., but might be just fine for
> tryserver repository :-)
> As in stripping older heads at the same time older ftp directories are removed.

I filed bug 633161 about TryServer.
(In reply to comment #12)
> Fwiw, see http://mercurial.selenic.com/wiki/PruningDeadBranches:
>
> "2. No-Op Merges": what you propose, but there seems to be pros and cons :-|

I don't think the cons are relevant to Mozilla's use of relbranches.
(In reply to comment #10)
> I'd say that every time we make a new release branch, we can close the last one
> for a product.

I filed bug 640510.
Product: mozilla.org → Release Engineering
Blocks: 927219
You need to log in before you can comment on or make changes to this bug.