|
|
Created:
7 years, 9 months ago by koz (OOO until 15th September) Modified:
7 years, 8 months ago Reviewers:
M-A Ruel CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, jeremya Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master Visibility:
Public. |
DescriptionWarn when git cl upload might be overwriting a newer patchset.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=191895
Patch Set 1 #
Total comments: 2
Patch Set 2 : respond to comments #
Total comments: 4
Patch Set 3 : change < to != #Messages
Total messages: 12 (0 generated)
jeremya@ and I thought this might be useful for people working on multiple machines.
Like the idea. https://codereview.chromium.org/12646011/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/1/git_cl.py#newcode1292 git_cl.py:1292: print 'The last upload made from this repository was patchset #%d but ' \ Use () instead of \
https://codereview.chromium.org/12646011/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/1/git_cl.py#newcode1292 git_cl.py:1292: print 'The last upload made from this repository was patchset #%d but ' \ On 2013/03/18 18:15:41, Marc-Antoine Ruel wrote: > Use () instead of \ Done.
https://codereview.chromium.org/12646011/diff/5001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/5001/git_cl.py#newcode1291 git_cl.py:1291: if local_patchset < latest_patchset: The problem here is that you are comparing patchset ids and not patchset numbers, and the ids are not guaranteed to be monotonically increasing.
https://codereview.chromium.org/12646011/diff/5001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/5001/git_cl.py#newcode1291 git_cl.py:1291: if local_patchset < latest_patchset: On 2013/03/19 01:26:45, Marc-Antoine Ruel wrote: > The problem here is that you are comparing patchset ids and not patchset > numbers, and the ids are not guaranteed to be monotonically increasing. Oh, they aren't? What if we change '<' to '!=' then, so the warning becomes about uploading a change to an issue that has been uploaded to from somewhere else (which is probably basically the same warning).
https://codereview.chromium.org/12646011/diff/5001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/5001/git_cl.py#newcode1291 git_cl.py:1291: if local_patchset < latest_patchset: On 2013/03/19 01:29:16, koz wrote: > On 2013/03/19 01:26:45, Marc-Antoine Ruel wrote: > > The problem here is that you are comparing patchset ids and not patchset > > numbers, and the ids are not guaranteed to be monotonically increasing. > > Oh, they aren't? What if we change '<' to '!=' then, so the warning becomes > about uploading a change to an issue that has been uploaded to from somewhere > else (which is probably basically the same warning). Yes please do.
https://codereview.chromium.org/12646011/diff/5001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/12646011/diff/5001/git_cl.py#newcode1291 git_cl.py:1291: if local_patchset < latest_patchset: On 2013/04/02 20:08:54, Marc-Antoine Ruel wrote: > On 2013/03/19 01:29:16, koz wrote: > > On 2013/03/19 01:26:45, Marc-Antoine Ruel wrote: > > > The problem here is that you are comparing patchset ids and not patchset > > > numbers, and the ids are not guaranteed to be monotonically increasing. > > > > Oh, they aren't? What if we change '<' to '!=' then, so the warning becomes > > about uploading a change to an issue that has been uploaded to from somewhere > > else (which is probably basically the same warning). > > Yes please do. Done.
lgtm
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/koz@chromium.org/12646011/12001
Message was sent while issue was closed.
Change committed as 191895
Message was sent while issue was closed.
On 2013/04/02 20:50:41, I haz the power (commit-bot) wrote: > Change committed as 191895 I got an error when trying to run git-cl upload: Traceback (most recent call last): File "/work/depot_tools/git_cl.py", line 1910, in <module> sys.exit(main(sys.argv[1:])) File "/work/depot_tools/git_cl.py", line 1895, in main return command(parser, argv[1:]) File "/work/depot_tools/git_cl.py", line 1299, in CMDupload % (local_patchset, latest_patchset)) TypeError: %d format: a number is required, not NoneType It turned out that local_patchset was None. I was working on a new branch on the same Rietveld issue as an older branch.
Message was sent while issue was closed.
On 2013/04/03 09:29:07, falken wrote: > On 2013/04/02 20:50:41, I haz the power (commit-bot) wrote: > > Change committed as 191895 > > I got an error when trying to run git-cl upload: > > Traceback (most recent call last): > File "/work/depot_tools/git_cl.py", line 1910, in <module> > sys.exit(main(sys.argv[1:])) > File "/work/depot_tools/git_cl.py", line 1895, in main > return command(parser, argv[1:]) > File "/work/depot_tools/git_cl.py", line 1299, in CMDupload > % (local_patchset, latest_patchset)) > TypeError: %d format: a number is required, not NoneType > > It turned out that local_patchset was None. I was working on a new branch on the > same Rietveld issue as an older branch. Yes, sorry about that. This has been fixed by dmikurube@ in r192050. |