Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Issue 1991563005: Add "archive" command to git_cl.py. (Closed)

Created:
4 years, 7 months ago by Kevin M
Modified:
4 years, 6 months ago
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org, tandrii+omg_git_cl_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add "archive" command to git_cl.py. This command archives branches whose Rietveldt status is closed by creating new Git tags for each of the branches' heads, and then deleting the branch. It automatically cleans up the clutter that accumulates over time in a long-lived Git checkout. For example, the branch "foo-bar" associated with the closed issue 1568403002 will be archived to the tag "git-cl-archived-1568403002-foo-bar". BUG=616404 R=martiniss@chromium.org,tandrii@chromium.org Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/3bff56bb499c27610fa7f3d538996048e6116d73

Patch Set 1 #

Total comments: 10

Patch Set 2 : Inlined "changes" variable #

Patch Set 3 : Made changes; added tests #

Patch Set 4 : Rebase and modify unit tests accordingly. #

Total comments: 16

Patch Set 5 : tandrii comments #

Total comments: 8

Patch Set 6 : cl feedback #

Patch Set 7 : reverse order of branch/issue ID #

Total comments: 28

Patch Set 8 : code review feedback #

Patch Set 9 : "cleanup" => "archive" #

Patch Set 10 : updated proposed tag name #

Total comments: 2

Patch Set 11 : use default sort() comparator #

Total comments: 6

Patch Set 12 : m-a ruel feedback #

Patch Set 13 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -0 lines) Patch
M git_cl.py View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +67 lines, -0 lines 0 comments Download
M tests/git_cl_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (16 generated)
Kevin M
4 years, 7 months ago (2016-05-19 23:40:56 UTC) #1
Kevin M
4 years, 7 months ago (2016-05-19 23:43:38 UTC) #2
martiniss
change looks fine, but I would like tandrii to look at it because he has ...
4 years, 7 months ago (2016-05-20 03:11:55 UTC) #7
Kevin M
https://codereview.chromium.org/1991563005/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/1/git_cl.py#newcode3123 git_cl.py:3123: branches = [c.GetBranch() for c in changes] On 2016/05/20 ...
4 years, 7 months ago (2016-05-20 16:54:41 UTC) #8
tandrii(chromium)
(Stephen, thanks to referring this CL to me!) high level comments: 1. There have been ...
4 years, 7 months ago (2016-05-20 20:56:19 UTC) #9
Kevin M
https://codereview.chromium.org/1991563005/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/1/git_cl.py#newcode2967 git_cl.py:2967: return On 2016/05/20 20:56:19, tandrii(chromium)slowTillMay31 wrote: > are you ...
4 years, 7 months ago (2016-05-20 22:18:14 UTC) #10
Kevin M
I'm happy you're on board with the concept!
4 years, 7 months ago (2016-05-20 22:18:59 UTC) #11
Kevin M
4 years, 7 months ago (2016-05-26 20:20:08 UTC) #12
tandrii(chromium)
Kevin, can you rebase (non-trivial) on top of this https://codereview.chromium.org/1893563002/ (just landed)? I think your ...
4 years, 6 months ago (2016-05-31 11:35:14 UTC) #13
Kevin M
Rebase done!
4 years, 6 months ago (2016-05-31 18:24:42 UTC) #14
tandrii(chromium)
thanks, it looks very good. A bunch of comments inline. https://codereview.chromium.org/1991563005/diff/60001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/60001/git_cl.py#newcode3093 ...
4 years, 6 months ago (2016-05-31 18:46:16 UTC) #15
Kevin M
Also added logic to verify that the user is not currently on a closed branch, ...
4 years, 6 months ago (2016-05-31 20:05:22 UTC) #16
tandrii(chromium)
good idea for check of the current branch. https://codereview.chromium.org/1991563005/diff/80001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/80001/git_cl.py#newcode3117 git_cl.py:3117: current_branch ...
4 years, 6 months ago (2016-05-31 20:18:33 UTC) #17
Kevin M
https://codereview.chromium.org/1991563005/diff/80001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/80001/git_cl.py#newcode3117 git_cl.py:3117: current_branch = RunGit(['symbolic-ref', 'HEAD', '--short']).strip() On 2016/05/31 20:18:32, tandrii(chromium) ...
4 years, 6 months ago (2016-05-31 20:26:35 UTC) #18
tandrii(chromium)
forgot to upload? :) and once you do, use --dry-run or hit CQ dry run ...
4 years, 6 months ago (2016-05-31 20:50:04 UTC) #19
Kevin M
Sorry, thought the upload went through. :\ How's this?
4 years, 6 months ago (2016-05-31 23:12:36 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991563005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1991563005/100001
4 years, 6 months ago (2016-05-31 23:13:55 UTC) #22
commit-bot: I haz the power
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started ...
4 years, 6 months ago (2016-05-31 23:13:58 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991563005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1991563005/120001
4 years, 6 months ago (2016-06-01 09:29:58 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-01 09:32:47 UTC) #30
tandrii(chromium)
LGTM % very nitty nit And due to some coincidence I got to know that ...
4 years, 6 months ago (2016-06-01 09:53:17 UTC) #32
M-A Ruel
fine with getting rid of git-tree-prune. I'm a bit confused about the purpose of this ...
4 years, 6 months ago (2016-06-01 12:43:17 UTC) #34
Kevin M
Thanks. > I'm a bit confused about the purpose of this command vs git rebase-update, ...
4 years, 6 months ago (2016-06-01 17:49:05 UTC) #35
M-A Ruel
I think it'd prefer 'archive' to 'cleanup'. This commands doesn't cleanup, it creates tags, so ...
4 years, 6 months ago (2016-06-02 19:56:56 UTC) #36
Kevin M
OK, it's "git cl archive" now. Please take a look.
4 years, 6 months ago (2016-06-02 21:19:57 UTC) #38
tandrii(chromium)
https://codereview.chromium.org/1991563005/diff/120001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/120001/git_cl.py#newcode3125 git_cl.py:3125: print ('You are currently on a branch \'%s\' which ...
4 years, 6 months ago (2016-06-02 21:35:31 UTC) #39
Kevin M
https://codereview.chromium.org/1991563005/diff/180001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/180001/git_cl.py#newcode3110 git_cl.py:3110: proposal.sort(lambda x, y: x[0] > y[0]) On 2016/06/02 21:35:30, ...
4 years, 6 months ago (2016-06-02 22:20:35 UTC) #40
tandrii(chromium)
On 2016/06/02 22:20:35, Kevin M wrote: > https://codereview.chromium.org/1991563005/diff/180001/git_cl.py > File git_cl.py (right): > > https://codereview.chromium.org/1991563005/diff/180001/git_cl.py#newcode3110 ...
4 years, 6 months ago (2016-06-03 09:39:41 UTC) #41
M-A Ruel
https://codereview.chromium.org/1991563005/diff/120001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/120001/git_cl.py#newcode3125 git_cl.py:3125: print ('You are currently on a branch \'%s\' which ...
4 years, 6 months ago (2016-06-03 13:06:39 UTC) #42
Kevin M
https://codereview.chromium.org/1991563005/diff/120001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/1991563005/diff/120001/git_cl.py#newcode3125 git_cl.py:3125: print ('You are currently on a branch \'%s\' which ...
4 years, 6 months ago (2016-06-03 22:34:00 UTC) #43
M-A Ruel
lgtm
4 years, 6 months ago (2016-06-07 01:19:33 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991563005/240001
4 years, 6 months ago (2016-06-07 01:28:18 UTC) #47
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 01:31:51 UTC) #49
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/tools/depot_tools/+/3bff56bb499c27...

Powered by Google App Engine
This is Rietveld 408576698