Commit cee6dc46 authored by pgervais@chromium.org's avatar pgervais@chromium.org

git cl push -> git cl land

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@268835 0039d316-1c4b-4281-b951-d872f2087c98
parent e57b09db
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"""A git-command for integrating reviews on Rietveld.""" """A git-command for integrating reviews on Rietveld."""
import datetime
from distutils.version import LooseVersion from distutils.version import LooseVersion
import glob import glob
import json import json
...@@ -18,6 +19,7 @@ import re ...@@ -18,6 +19,7 @@ import re
import stat import stat
import sys import sys
import textwrap import textwrap
import time
import threading import threading
import urllib2 import urllib2
import urlparse import urlparse
...@@ -1758,7 +1760,7 @@ def IsSubmoduleMergeCommit(ref): ...@@ -1758,7 +1760,7 @@ def IsSubmoduleMergeCommit(ref):
def SendUpstream(parser, args, cmd): def SendUpstream(parser, args, cmd):
"""Common code for CmdPush and CmdDCommit """Common code for CMDland and CmdDCommit
Squashes branch into a single commit. Squashes branch into a single commit.
Updates changelog with metadata (e.g. pointer to review). Updates changelog with metadata (e.g. pointer to review).
...@@ -2017,7 +2019,7 @@ will instead be silently ignored.""" ...@@ -2017,7 +2019,7 @@ will instead be silently ignored."""
@subcommand.usage('[upstream branch to apply against]') @subcommand.usage('[upstream branch to apply against]')
def CMDpush(parser, args): def CMDland(parser, args):
"""Commits the current changelist via git.""" """Commits the current changelist via git."""
if settings.GetIsGitSvn(): if settings.GetIsGitSvn():
print('This appears to be an SVN repository.') print('This appears to be an SVN repository.')
...@@ -2026,6 +2028,27 @@ def CMDpush(parser, args): ...@@ -2026,6 +2028,27 @@ def CMDpush(parser, args):
return SendUpstream(parser, args, 'push') return SendUpstream(parser, args, 'push')
@subcommand.usage('[upstream branch to apply against]')
def CMDpush(parser, args):
"""Temporary alias for 'land'.
"""
print(
"\n=======\n"
"'git cl push' has been renamed to 'git cl land'.\n"
"Currently they are treated as synonyms, but 'git cl push' will stop\n"
"working after 2014/07/01.\n"
"=======\n")
now = datetime.datetime.utcfromtimestamp(time.time())
if now > datetime.datetime(2014, 7, 1):
print('******\nReally, you should not use this command anymore... \n'
'Pausing 10 sec to help you remember :-)')
for n in xrange(10):
time.sleep(1)
print('%s seconds...' % (n+1))
print('******')
return CMDland(parser, args)
@subcommand.usage('<patch url or issue id>') @subcommand.usage('<patch url or issue id>')
def CMDpatch(parser, args): def CMDpatch(parser, args):
"""Patches in a code review.""" """Patches in a code review."""
......
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