Commit 671c7a3b authored by mark@chromium.org's avatar mark@chromium.org

Make “git cl land” handle core.abbrev > 7.

This also fixes the confusing help message that appears when using “git
cl dcommit” in a git project. “git cl push” was totally removed in
abbaa843.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@286835 0039d316-1c4b-4281-b951-d872f2087c98
parent cd1e3d40
......@@ -2013,7 +2013,7 @@ def SendUpstream(parser, args, cmd):
if cmd == 'dcommit' and 'Committed r' in output:
revision = re.match('.*?\nCommitted r(\\d+)', output, re.DOTALL).group(1)
elif cmd == 'push' and retcode == 0:
match = (re.match(r'.*?([a-f0-9]{7})\.\.([a-f0-9]{7})$', l)
match = (re.match(r'.*?([a-f0-9]{7,})\.\.([a-f0-9]{7,})$', l)
for l in output.splitlines(False))
match = filter(None, match)
if len(match) != 1:
......@@ -2057,7 +2057,7 @@ def CMDdcommit(parser, args):
If your project has a git mirror with an upstream SVN master, you probably need
to run 'git svn init', see your project's git mirror documentation.
If your project has a true writeable upstream repository, you probably want
to run 'git cl push' instead.
to run 'git cl land' instead.
Choose wisely, if you get this wrong, your commit might appear to succeed but
will instead be silently ignored."""
print(message)
......
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