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

Issue 184343003: Now trychange can store patches in a Git repo (Closed)

Created:
6 years, 9 months ago by nodir
Modified:
6 years, 8 months ago
CC:
chromium-reviews, cmp-cc_chromium.org, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org
Visibility:
Public.

Description

Now trychange can store patches in a Git repo A git patch repo is cloned to .git/git-try/patches-git, if was not cloned before. Otherwise, changes are pulled. Then a patch is committed and pushed. --revision=auto (Git only) is resolved to the revision the diff is generated against. R=stip@chromium.org, agable@chromium.org, iannucci@chromium.org, maruel@chromium.org BUG=325882 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260471

Patch Set 1 #

Patch Set 2 : nit #

Total comments: 16

Patch Set 3 : Addressed agable's suggestions #

Patch Set 4 : Made it obvious that options is current_vcs.options #

Patch Set 5 : Import email from the current repo instead of using global config #

Total comments: 9

Patch Set 6 : use contextmanager #

Total comments: 8

Patch Set 7 : #

Total comments: 15

Patch Set 8 : using branch file and separate branches for patches #

Total comments: 12

Patch Set 9 : nit #

Patch Set 10 : minor changes #

Patch Set 11 : branch -> ref #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -59 lines) Patch
M scm.py View 1 2 2 chunks +15 lines, -0 lines 0 comments Download
M tests/scm_unittest.py View 1 chunk +3 lines, -0 lines 0 comments Download
M tests/trychange_unittest.py View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M trychange.py View 1 2 3 4 5 6 7 8 9 10 12 chunks +246 lines, -57 lines 2 comments Download

Messages

Total messages: 35 (0 generated)
nodir
PTAL, now trychange.py can upload patches to a Git repo
6 years, 9 months ago (2014-03-03 21:48:43 UTC) #1
iannucci
Hey, Mike, can you take a look at this?
6 years, 9 months ago (2014-03-03 21:51:42 UTC) #2
agable
https://codereview.chromium.org/184343003/diff/20001/scm.py File scm.py (right): https://codereview.chromium.org/184343003/diff/20001/scm.py#newcode398 scm.py:398: return GIT.Capture(['rev-parse', '--git-dir'], cwd=cwd) Note that this returns a ...
6 years, 9 months ago (2014-03-04 21:45:59 UTC) #3
nodir
Mostly done except "current_vcs.options.git_repo" thing: IIUC, we either should not use options variable in that ...
6 years, 9 months ago (2014-03-04 22:51:18 UTC) #4
ghost stip (do not use)
Interesting. Would this be a way forward for the bisect bot stuff? We could give ...
6 years, 9 months ago (2014-03-04 22:54:19 UTC) #5
agable
https://codereview.chromium.org/184343003/diff/20001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/20001/trychange.py#newcode935 trychange.py:935: if options.git_repo and not vcs_is_git: On 2014/03/04 22:51:19, nodir ...
6 years, 9 months ago (2014-03-05 19:49:50 UTC) #6
nodir
https://codereview.chromium.org/184343003/diff/20001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/20001/trychange.py#newcode935 trychange.py:935: if options.git_repo and not vcs_is_git: On 2014/03/05 19:49:50, agable ...
6 years, 9 months ago (2014-03-05 20:07:00 UTC) #7
nodir
On 2014/03/05 20:07:00, nodir wrote: > https://codereview.chromium.org/184343003/diff/20001/trychange.py > File trychange.py (right): > > https://codereview.chromium.org/184343003/diff/20001/trychange.py#newcode935 > ...
6 years, 9 months ago (2014-03-10 23:46:50 UTC) #8
nodir
+navabi
6 years, 9 months ago (2014-03-10 23:48:32 UTC) #9
Dirk Pranke
Sorry for the late drive-by comments, but why do you/we want to store patches in ...
6 years, 9 months ago (2014-03-11 02:36:01 UTC) #10
nodir1
This is a temporary solution for those projects that use Gerrit. At the moment git-cl-try/tryServer ...
6 years, 9 months ago (2014-03-11 03:28:42 UTC) #11
agable
Have you used this successfully in an end-to-end test, posting a patch to the git ...
6 years, 9 months ago (2014-03-17 23:15:42 UTC) #12
nodir
On 2014/03/17 23:15:42, agable wrote: > Have you used this successfully in an end-to-end test, ...
6 years, 9 months ago (2014-03-17 23:17:37 UTC) #13
ghost stip (do not use)
basically lg, with a few comments https://chromiumcodereview.appspot.com/184343003/diff/70001/trychange.py File trychange.py (right): https://chromiumcodereview.appspot.com/184343003/diff/70001/trychange.py#newcode482 trychange.py:482: def _PrepareDescriptionAndPatchFiles(description, options, ...
6 years, 9 months ago (2014-03-19 01:28:52 UTC) #14
M-A Ruel
https://codereview.chromium.org/184343003/diff/70001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/70001/trychange.py#newcode510 trychange.py:510: callback(full_patch_filename, description_file.name) On 2014/03/19 01:28:53, stip wrote: > why ...
6 years, 9 months ago (2014-03-19 01:34:23 UTC) #15
nodir
https://codereview.chromium.org/184343003/diff/70001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/70001/trychange.py#newcode482 trychange.py:482: def _PrepareDescriptionAndPatchFiles(description, options, callback): On 2014/03/19 01:28:53, stip wrote: ...
6 years, 9 months ago (2014-03-24 23:57:51 UTC) #16
M-A Ruel
https://codereview.chromium.org/184343003/diff/90001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/90001/trychange.py#newcode524 trychange.py:524: yield full_patch_filename, description_file.name If description_file.name is to be opened ...
6 years, 9 months ago (2014-03-25 01:42:56 UTC) #17
nodir
This issue becomes urgent because I've finally got the servers, which was the bottleneck https://codereview.chromium.org/184343003/diff/90001/trychange.py ...
6 years, 9 months ago (2014-03-26 05:26:51 UTC) #18
M-A Ruel
https://codereview.chromium.org/184343003/diff/110001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/110001/trychange.py#newcode494 trychange.py:494: """Create a temporary directory, append the specified name and ...
6 years, 9 months ago (2014-03-26 12:57:09 UTC) #19
nodir1
cmp, Gerrit does not allow to create new branches when I do push. Is it ...
6 years, 9 months ago (2014-03-26 16:53:04 UTC) #20
agable
https://codereview.chromium.org/184343003/diff/110001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/110001/trychange.py#newcode599 trychange.py:599: scm.GIT.Capture(['clone', git_url, GIT_PATCH_DIR_BASENAME], cwd=git_dir) The patch-specific refs are going ...
6 years, 9 months ago (2014-03-26 17:15:10 UTC) #21
nodir
https://codereview.chromium.org/184343003/diff/110001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/110001/trychange.py#newcode494 trychange.py:494: """Create a temporary directory, append the specified name and ...
6 years, 9 months ago (2014-03-26 17:18:16 UTC) #22
nodir
agable, here is what I see: Command git push origin master:master nodir.diff#e8c95.2014-03-26-10.20.18.828554.diff:nodir.diff#e8c95.2014-03-26-10.20.18.828554.diff returned non-zero exit ...
6 years, 9 months ago (2014-03-26 17:21:01 UTC) #23
nodir
Permissions where granted
6 years, 9 months ago (2014-03-26 17:44:03 UTC) #24
M-A Ruel
Ok about the plan, I'll let Aaron complete the review.
6 years, 9 months ago (2014-03-26 18:23:59 UTC) #25
nodir
PTAL: https://codereview.chromium.org/213413004
6 years, 9 months ago (2014-03-26 18:38:05 UTC) #26
nodir
Uploaded the patch to this CL. It is difficult to see the changes in a ...
6 years, 9 months ago (2014-03-26 18:51:06 UTC) #27
ghost stip (do not use)
some comments https://chromiumcodereview.appspot.com/184343003/diff/110001/trychange.py File trychange.py (right): https://chromiumcodereview.appspot.com/184343003/diff/110001/trychange.py#newcode172 trychange.py:172: # primarily for revision=auto nit: Capitalize comments ...
6 years, 9 months ago (2014-03-26 19:16:36 UTC) #28
nodir
On 2014/03/26 19:16:36, stip wrote: > some comments > > https://chromiumcodereview.appspot.com/184343003/diff/110001/trychange.py > File trychange.py (right): ...
6 years, 9 months ago (2014-03-26 19:28:45 UTC) #29
agable
https://codereview.chromium.org/184343003/diff/160001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/160001/trychange.py#newcode571 trychange.py:571: """Get a path to a Git repo with patches ...
6 years, 9 months ago (2014-03-26 20:27:04 UTC) #30
nodir
https://codereview.chromium.org/184343003/diff/160001/trychange.py File trychange.py (right): https://codereview.chromium.org/184343003/diff/160001/trychange.py#newcode571 trychange.py:571: """Get a path to a Git repo with patches ...
6 years, 9 months ago (2014-03-26 20:57:01 UTC) #31
nodir
ping
6 years, 9 months ago (2014-03-28 20:03:23 UTC) #32
ghost stip (do not use)
lgtm % mine and aaron's comments https://chromiumcodereview.appspot.com/184343003/diff/210001/trychange.py File trychange.py (right): https://chromiumcodereview.appspot.com/184343003/diff/210001/trychange.py#newcode895 trychange.py:895: group.add_option("--use_git", it doesn't ...
6 years, 9 months ago (2014-03-28 23:24:07 UTC) #33
nodir
Committed patchset #11 manually as r260471.
6 years, 8 months ago (2014-03-30 22:10:23 UTC) #34
nodir
6 years, 8 months ago (2014-03-31 20:25:12 UTC) #35
Message was sent while issue was closed.
stip@
Just noticed that I didn't send my comment

https://codereview.chromium.org/184343003/diff/160001/trychange.py
File trychange.py (right):

https://codereview.chromium.org/184343003/diff/160001/trychange.py#newcode649
trychange.py:649: try:
On 2014/03/26 20:27:04, agable wrote:
> This try is around a lot of different calls, only some of which actually touch
> the network. The try/except block should have much finer granularity. For
> example, a CalledProcessError raised by 'git reset' should not result in a
> NoTryServerAccess error.

Done.

https://codereview.chromium.org/184343003/diff/160001/trychange.py#newcode681
trychange.py:681: def _retry(action, fixup=None, attempts=3):
On 2014/03/26 20:27:04, agable wrote:
> There are already other retry mechanisms floating around, there's probably not
a
> need to actually implement a new one. And, this method is only called once, so
I
> would just inline it. In fact, the whole mess of inner methods in
_SendChangeGit
> only exist so that they can be passed to this function. Remove it and you can
> streamline _SendChangeGit and make it much more straight-line code.

Done.

https://codereview.chromium.org/184343003/diff/210001/trychange.py
File trychange.py (right):

https://codereview.chromium.org/184343003/diff/210001/trychange.py#newcode895
trychange.py:895: group.add_option("--use_git",
On 2014/03/28 23:24:08, stip wrote:
> it doesn't look like this option is used, please delete

It is used the same way as use_svn. If set, the options.send_patch contains
_SendChangeGit. Better to be consistent.

Powered by Google App Engine
This is Rietveld 408576698