mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 22:47:26 +03:00
5232dcf9d1
Summary: Use sed to convert testutil.ddot requires to hghave. ignore-conflict-markers for test-simplemerge.py Reviewed By: simpkins Differential Revision: D19658355 fbshipit-source-id: afae73eb1e43ead79514dfaf9f911f51ac25972e
47 lines
894 B
Python
47 lines
894 B
Python
# Copyright 2019 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
# isort:skip_file
|
|
|
|
import os
|
|
import sys
|
|
from hghave import require
|
|
|
|
require(["py2"])
|
|
|
|
if os.name == "nt":
|
|
sys.exit(80)
|
|
|
|
from edenscm.mercurial.util import describe, renderstack
|
|
|
|
|
|
@describe(lambda b: "plus1 b = %s" % b)
|
|
def plus1(a, b):
|
|
return plus2(a, b=b)
|
|
|
|
|
|
@describe(lambda b, a: "plus2 a = %s, b = %s" % (a, b))
|
|
def plus2(a, b):
|
|
return plus3(a=a, b=b)
|
|
|
|
|
|
@describe(lambda b, a=0, c=0: "plus3 a = %s, b = %s, c = %s" % (a, b, c))
|
|
def plus3(**kwargs):
|
|
return plus4(**kwargs)
|
|
|
|
|
|
@describe(lambda: 1 / 0)
|
|
def plus4(a, b):
|
|
return plus5(a, b)
|
|
|
|
|
|
@describe(lambda x: "plus5 x = %s" % (x,))
|
|
def plus5(a, b):
|
|
for line in renderstack():
|
|
print(line)
|
|
return a + b
|
|
|
|
|
|
print("result = %s" % plus1(3, 5))
|