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

Issue 10836180: Make git try warn on a dirty index. (Closed)

Created:
8 years, 4 months ago by gavinp
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Dirk Pranke, cmp+cc_chromium.org, M-A Ruel
Visibility:
Public.

Description

Make git try warn on a dirty index. Many, many times this has burned me badly; if you have a dirty index, git try will just upload your commits, and not the index. R=nsylvain@chromium.org BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=151202

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : minimize unittest diff a bit... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -9 lines) Patch
M tests/trychange_unittest.py View 1 2 3 chunks +8 lines, -8 lines 0 comments Download
M trychange.py View 1 3 chunks +29 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
gavinp
nsylvain, wdyt?
8 years, 4 months ago (2012-08-09 18:07:04 UTC) #1
nsylvain
Forwarding the cmp or szager.
8 years, 4 months ago (2012-08-10 17:08:44 UTC) #2
cmp
lgtm with nits http://codereview.chromium.org/10836180/diff/1/trychange.py File trychange.py (right): http://codereview.chromium.org/10836180/diff/1/trychange.py#newcode67 trychange.py:67: nit: insert an empty line before ...
8 years, 4 months ago (2012-08-10 23:51:50 UTC) #3
gavinp
8 years, 4 months ago (2012-08-12 16:52:16 UTC) #4
Thanks for the review cmp. I've now added unit test coverage, and it passes
presubmit, which was not true of the first upload.

http://codereview.chromium.org/10836180/diff/1/trychange.py
File trychange.py (right):

http://codereview.chromium.org/10836180/diff/1/trychange.py#newcode67
trychange.py:67: 
On 2012/08/10 23:51:50, cmp wrote:
> nit: insert an empty line before line 67

Done.

http://codereview.chromium.org/10836180/diff/1/trychange.py#newcode82
trychange.py:82: 
On 2012/08/10 23:51:50, cmp wrote:
> nit: insert an empty line before line 82

Done.

http://codereview.chromium.org/10836180/diff/1/trychange.py#newcode291
trychange.py:291: # TODO(gavinp): Can we just include the index?
On 2012/08/10 23:51:50, cmp wrote:
> safe to remove this line, we can't include the index, since our workflow
assumes
> that devs will be committing their changes to their repos.

I've removed the comment, and I'll think about this more.

But commit-first is definitely not my ideal workflow for try jobs, although the
tool currently requires this. I frequently have changes that fail on one
platform, and rather than do a local build, I send a try job to see if the
obvious fix worked, and move on to other work. The reason that I made this
change is that I frequently confused myself by running my commits only, without
my index, and I wouldn't understand why my changes had no effect.

Although perhaps the nonce commit makes sense; to change repos I need to commit
anyway, or use the unreliable stash feature. I have been known to redownload my
try diff though, and just commit that later.

So I see both sides, especially now that I realise I need to switch to another
repo anyway while i wait for the try job. Hrm.

Powered by Google App Engine
This is Rietveld 408576698