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

Unified Diff: git_cl.py

Issue 258983004: git cl push -> git cl land (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Improved messages Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index e8cadf270d1d9a7f85aed299e41f2bb328499b66..108759260004a1211949dd42437663eb8f51da57 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -7,6 +7,7 @@
"""A git-command for integrating reviews on Rietveld."""
+import datetime
from distutils.version import LooseVersion
import glob
import json
@@ -18,6 +19,7 @@ import re
import stat
import sys
import textwrap
+import time
import threading
import urllib2
import urlparse
@@ -1747,7 +1749,7 @@ def IsSubmoduleMergeCommit(ref):
def SendUpstream(parser, args, cmd):
- """Common code for CmdPush and CmdDCommit
+ """Common code for CMDland and CmdDCommit
Squashes branch into a single commit.
Updates changelog with metadata (e.g. pointer to review).
@@ -2006,7 +2008,7 @@ will instead be silently ignored."""
@subcommand.usage('[upstream branch to apply against]')
-def CMDpush(parser, args):
+def CMDland(parser, args):
"""Commits the current changelist via git."""
if settings.GetIsGitSvn():
print('This appears to be an SVN repository.')
@@ -2015,6 +2017,27 @@ def CMDpush(parser, args):
return SendUpstream(parser, args, 'push')
+@subcommand.usage('[upstream branch to apply against]')
+def CMDpush(parser, args):
+ """Temporary alias for 'land'.
szager1 2014/05/01 21:11:11 One-line comment (move trailing """ up).
+ """
+ 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"
Nico 2014/07/16 17:53:52 Why stop supporting the old thing, and why print t
+ "=======\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 :-)')
szager1 2014/05/01 21:11:11 Better, I think, to hang at the terminal: sys.std
+ 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>')
def CMDpatch(parser, args):
"""Patches in a code review."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698