Commit 279c2188 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Use `git rev-list A..B` to get the list of commits to be uploaded to Gerrit by git cl.

BUG=374121

Review URL: https://codereview.chromium.org/284113005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270972 0039d316-1c4b-4281-b951-d872f2087c98
parent a656e705
......@@ -1498,11 +1498,11 @@ def GerritUpload(options, args, cl):
if CHANGE_ID not in change_desc.description:
AddChangeIdToCommitMessage(options, args)
commits = RunGit(['rev-list', '%s/%s...' % (remote, branch)]).splitlines()
commits = RunGit(['rev-list', '%s/%s..' % (remote, branch)]).splitlines()
if len(commits) > 1:
print('WARNING: This will upload %d commits. Run the following command '
'to see which commits will be uploaded: ' % len(commits))
print('git log %s/%s...' % (remote, branch))
print('git log %s/%s..' % (remote, branch))
print('You can also use `git squash-branch` to squash these into a single'
'commit.')
ask_for_data('About to upload; enter to confirm.')
......
......@@ -588,7 +588,7 @@ class TestGitCl(TestCase):
description)
]
calls += [
((['git', 'rev-list', 'origin/master...'],), ''),
((['git', 'rev-list', 'origin/master..'],), ''),
((['git', 'config', 'rietveld.cc'],), '')
]
receive_pack = '--receive-pack=git receive-pack '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment