blob: 6037e5a3f3d114440ad262fbb7a8982090020f2f [file] [log] [blame]
Mike Frysingerf6013762019-06-13 02:30:51 -04001# -*- coding:utf-8 -*-
Nico Sallembien6623b212010-05-11 12:57:01 -07002#
3# Copyright (C) 2010 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
David Pursehousee00aa6b2012-09-11 14:33:51 +090017from subcmds.sync import Sync
Nico Sallembien6623b212010-05-11 12:57:01 -070018
David Pursehouse819827a2020-02-12 15:20:19 +090019
Nico Sallembien6623b212010-05-11 12:57:01 -070020class Smartsync(Sync):
21 common = True
22 helpSummary = "Update working tree to the latest known good revision"
23 helpUsage = """
24%prog [<project>...]
25"""
26 helpDescription = """
27The '%prog' command is a shortcut for sync -s.
28"""
29
30 def _Options(self, p):
31 Sync._Options(self, p, show_smart=False)
32
33 def Execute(self, opt, args):
34 opt.smart_sync = True
35 Sync.Execute(self, opt, args)