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

Issue 896453002: Disallow applying patches when git tree is dirty (Closed)

Created:
5 years, 10 months ago by wychen
Modified:
5 years, 8 months ago
Reviewers:
yoichio, Dirk Pranke, dpranke+depot_tools, Sam Clegg, iannucci+depot_tools
CC:
chromium-reviews, cmp-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Project:
tools
Visibility:
Public.

Description

Disallow applying patches when git tree is dirty This allows proper clean-up after failing to apply a patch. Therefore, if "git cl diff" ends up having conflict, it could be cleaned up. BUG=438362 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=294679

Patch Set 1 #

Total comments: 2

Patch Set 2 : add comments #

Total comments: 2

Patch Set 3 : add more safeguards and comments #

Patch Set 4 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -0 lines) Patch
M git_cl.py View 1 2 3 4 chunks +18 lines, -0 lines 1 comment Download

Messages

Total messages: 35 (14 generated)
wychen
PTAL
5 years, 10 months ago (2015-02-02 15:14:46 UTC) #2
iannucci
This seems reasonable to me, but I don't understand the diff change. https://codereview.chromium.org/896453002/diff/1/git_cl.py File git_cl.py ...
5 years, 10 months ago (2015-02-02 15:49:42 UTC) #4
wychen
Added some comments to explain why this is necessary. https://codereview.chromium.org/896453002/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/896453002/diff/1/git_cl.py#newcode2777 git_cl.py:2777: ...
5 years, 10 months ago (2015-02-02 17:09:26 UTC) #5
Sam Clegg
https://codereview.chromium.org/896453002/diff/20001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/896453002/diff/20001/git_cl.py#newcode2470 git_cl.py:2470: RunGit(['reset', '--hard']) I find this a little scary. Perhaps ...
5 years, 10 months ago (2015-02-02 17:43:18 UTC) #6
wychen
Added assert(!is_dirty_git_tree) and some comments. PTAL. https://codereview.chromium.org/896453002/diff/20001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/896453002/diff/20001/git_cl.py#newcode2470 git_cl.py:2470: RunGit(['reset', '--hard']) On ...
5 years, 10 months ago (2015-02-03 02:33:45 UTC) #7
Sam Clegg
On 2015/02/03 02:33:45, Wei-Yin Chen wrote: > Added assert(!is_dirty_git_tree) and some comments. PTAL. > > ...
5 years, 10 months ago (2015-02-03 02:41:30 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/896453002/40001
5 years, 10 months ago (2015-02-03 05:21:24 UTC) #10
commit-bot: I haz the power
Presubmit check for 896453002-40001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 10 months ago (2015-02-03 05:24:21 UTC) #12
wychen
Hi Robbie, PTAL. Thanks!
5 years, 10 months ago (2015-02-03 20:03:27 UTC) #13
wychen
PTAL.
5 years, 9 months ago (2015-02-27 09:35:21 UTC) #15
wychen
Rebased. PTAL. Thanks!
5 years, 8 months ago (2015-04-03 07:17:07 UTC) #16
Sam Clegg
slgtm
5 years, 8 months ago (2015-04-03 16:04:03 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/896453002/60001
5 years, 8 months ago (2015-04-03 18:12:23 UTC) #20
commit-bot: I haz the power
Presubmit check for 896453002-60001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 8 months ago (2015-04-03 18:14:51 UTC) #23
Dirk Pranke
lgtm
5 years, 8 months ago (2015-04-03 20:11:56 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/896453002/60001
5 years, 8 months ago (2015-04-03 20:29:30 UTC) #27
commit-bot: I haz the power
Presubmit check for 896453002-60001 failed and returned exit status 1. Running presubmit commit checks ...
5 years, 8 months ago (2015-04-03 20:32:54 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/896453002/60001
5 years, 8 months ago (2015-04-03 21:01:17 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:60001) as http://src.chromium.org/viewvc/chrome?view=rev&revision=294679
5 years, 8 months ago (2015-04-03 21:04:52 UTC) #32
yoichio
https://codereview.chromium.org/896453002/diff/60001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/896453002/diff/60001/git_cl.py#newcode2605 git_cl.py:2605: RunGit(['reset', '--hard']) This resets working tree. Why? I prefer ...
5 years, 8 months ago (2015-04-27 07:52:31 UTC) #34
wychen
5 years, 8 months ago (2015-04-27 17:45:16 UTC) #35
Message was sent while issue was closed.
On 2015/04/27 07:52:31, yoichio wrote:
> https://codereview.chromium.org/896453002/diff/60001/git_cl.py
> File git_cl.py (right):
> 
> https://codereview.chromium.org/896453002/diff/60001/git_cl.py#newcode2605
> git_cl.py:2605: RunGit(['reset', '--hard'])
> This resets working tree. Why?
> I prefer the state reset because we can edit conflicts in local.

Thanks for reporting this bug. I already had a patch in progress here:
https://codereview.chromium.org/1091283004/

Powered by Google App Engine
This is Rietveld 408576698