mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #17004 - nox:rollup, r=nox
Rollup of 7 pull requests - Successful merges: #16885, #16886, #16932, #16939, #16948, #16986, #16995 - Failed merges: <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17004) <!-- Reviewable:end -->
This commit is contained in:
commit
98edf5d54d
8 changed files with 35 additions and 66 deletions
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -263,7 +263,7 @@ name = "blurz"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dbus 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"dbus 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dbus"
|
name = "dbus"
|
||||||
version = "0.5.2"
|
version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -971,7 +971,7 @@ dependencies = [
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"nsstring_vendor 0.1.0",
|
"nsstring_vendor 0.1.0",
|
||||||
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"stylo_tests 0.0.1",
|
"stylo_tests 0.0.1",
|
||||||
|
@ -1398,7 +1398,7 @@ dependencies = [
|
||||||
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"script_layout_interface 0.0.1",
|
"script_layout_interface 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1446,7 +1446,7 @@ dependencies = [
|
||||||
"script 0.0.1",
|
"script 0.0.1",
|
||||||
"script_layout_interface 0.0.1",
|
"script_layout_interface 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
|
@ -2369,7 +2369,7 @@ dependencies = [
|
||||||
"script_layout_interface 0.0.1",
|
"script_layout_interface 0.0.1",
|
||||||
"script_plugins 0.0.1",
|
"script_plugins 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_atoms 0.0.1",
|
"servo_atoms 0.0.1",
|
||||||
|
@ -2413,7 +2413,7 @@ dependencies = [
|
||||||
"profile_traits 0.0.1",
|
"profile_traits 0.0.1",
|
||||||
"range 0.0.1",
|
"range 0.0.1",
|
||||||
"script_traits 0.0.1",
|
"script_traits 0.0.1",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"webrender_traits 0.39.0 (git+https://github.com/servo/webrender)",
|
"webrender_traits 0.39.0 (git+https://github.com/servo/webrender)",
|
||||||
|
@ -2466,7 +2466,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "selectors"
|
name = "selectors"
|
||||||
version = "0.18.0"
|
version = "0.19.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cssparser 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cssparser 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -2869,7 +2869,7 @@ dependencies = [
|
||||||
"precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"servo_atoms 0.0.1",
|
"servo_atoms 0.0.1",
|
||||||
|
@ -2906,7 +2906,7 @@ dependencies = [
|
||||||
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rayon 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"servo_atoms 0.0.1",
|
"servo_atoms 0.0.1",
|
||||||
"servo_config 0.0.1",
|
"servo_config 0.0.1",
|
||||||
"servo_url 0.0.1",
|
"servo_url 0.0.1",
|
||||||
|
@ -2939,7 +2939,7 @@ dependencies = [
|
||||||
"geckoservo 0.0.1",
|
"geckoservo 0.0.1",
|
||||||
"libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"selectors 0.18.0",
|
"selectors 0.19.0",
|
||||||
"size_of_test 0.0.1",
|
"size_of_test 0.0.1",
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
|
@ -3508,7 +3508,7 @@ dependencies = [
|
||||||
"checksum cssparser 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "88dc7bd2a41b9c6c66456ac709d9efead1deb390d2c252c59e0ddfff9cdf0c94"
|
"checksum cssparser 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "88dc7bd2a41b9c6c66456ac709d9efead1deb390d2c252c59e0ddfff9cdf0c94"
|
||||||
"checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"
|
"checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df"
|
||||||
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
|
||||||
"checksum dbus 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "47f881971824401c27bc1ff9f641d54ac66e0f409631806fa7be8cad8e6be450"
|
"checksum dbus 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4aee01fb76ada3e5e7ca642ea6664ebf7308a810739ca2aca44909a1191ac254"
|
||||||
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
|
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
|
||||||
"checksum deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebb02aaf4b775afc96684b8402510a338086974e38570a1f65bea8c202eb77a7"
|
"checksum deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebb02aaf4b775afc96684b8402510a338086974e38570a1f65bea8c202eb77a7"
|
||||||
"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
|
"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
994e552f1f9515c84ec2ed66012bf3bd1684c206
|
2233f515b1e8281841ceaed802f74fe2f9e54701
|
||||||
|
|
|
@ -24,6 +24,4 @@ interface HTMLFormElement : HTMLElement {
|
||||||
void reset();
|
void reset();
|
||||||
//boolean checkValidity();
|
//boolean checkValidity();
|
||||||
//boolean reportValidity();
|
//boolean reportValidity();
|
||||||
|
|
||||||
//void requestAutocomplete();
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
|
|
||||||
name = "selectors"
|
name = "selectors"
|
||||||
version = "0.18.0" # Not yet published
|
version = "0.19.0" # Not yet published
|
||||||
authors = ["Simon Sapin <simon.sapin@exyr.org>", "Alan Jeffrey <ajeffrey@mozilla.com>"]
|
authors = ["Simon Sapin <simon.sapin@exyr.org>", "Alan Jeffrey <ajeffrey@mozilla.com>"]
|
||||||
documentation = "https://docs.rs/selectors/"
|
documentation = "https://docs.rs/selectors/"
|
||||||
|
|
||||||
|
|
|
@ -1596,28 +1596,28 @@ ${helpers.predefined_type("scroll-snap-coordinate",
|
||||||
},
|
},
|
||||||
"rotate" => {
|
"rotate" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::Rotate(theta));
|
result.push(SpecifiedOperation::Rotate(theta));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
"rotatex" => {
|
"rotatex" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::RotateX(theta));
|
result.push(SpecifiedOperation::RotateX(theta));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
"rotatey" => {
|
"rotatey" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::RotateY(theta));
|
result.push(SpecifiedOperation::RotateY(theta));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
"rotatez" => {
|
"rotatez" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::RotateZ(theta));
|
result.push(SpecifiedOperation::RotateZ(theta));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
|
@ -1630,7 +1630,7 @@ ${helpers.predefined_type("scroll-snap-coordinate",
|
||||||
try!(input.expect_comma());
|
try!(input.expect_comma());
|
||||||
let az = try!(specified::parse_number(context, input));
|
let az = try!(specified::parse_number(context, input));
|
||||||
try!(input.expect_comma());
|
try!(input.expect_comma());
|
||||||
let theta = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
// TODO(gw): Check the axis can be normalized!!
|
// TODO(gw): Check the axis can be normalized!!
|
||||||
result.push(SpecifiedOperation::Rotate3D(ax, ay, az, theta));
|
result.push(SpecifiedOperation::Rotate3D(ax, ay, az, theta));
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -1650,14 +1650,14 @@ ${helpers.predefined_type("scroll-snap-coordinate",
|
||||||
},
|
},
|
||||||
"skewx" => {
|
"skewx" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta_x = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta_x = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::SkewX(theta_x));
|
result.push(SpecifiedOperation::SkewX(theta_x));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
"skewy" => {
|
"skewy" => {
|
||||||
try!(input.parse_nested_block(|input| {
|
try!(input.parse_nested_block(|input| {
|
||||||
let theta_y = try!(specified::Angle::parse_with_unitless(context,input));
|
let theta_y = try!(specified::Angle::parse_with_unitless(context, input));
|
||||||
result.push(SpecifiedOperation::SkewY(theta_y));
|
result.push(SpecifiedOperation::SkewY(theta_y));
|
||||||
Ok(())
|
Ok(())
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -235,9 +235,9 @@ impl CalcNode {
|
||||||
///
|
///
|
||||||
/// This should parse correctly:
|
/// This should parse correctly:
|
||||||
///
|
///
|
||||||
/// * `2`
|
/// * `2`
|
||||||
/// * `2 * 2`
|
/// * `2 * 2`
|
||||||
/// * `2 * 2 + 2` (but will leave the `+ 2` unparsed).
|
/// * `2 * 2 + 2` (but will leave the `+ 2` unparsed).
|
||||||
///
|
///
|
||||||
fn parse_product(
|
fn parse_product(
|
||||||
context: &ParserContext,
|
context: &ParserContext,
|
||||||
|
|
|
@ -2497,16 +2497,18 @@ fn append_computed_property_value(keyframe: *mut structs::Keyframe,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Offset {
|
||||||
|
Zero,
|
||||||
|
One
|
||||||
|
}
|
||||||
|
|
||||||
fn fill_in_missing_keyframe_values(all_properties: &[TransitionProperty],
|
fn fill_in_missing_keyframe_values(all_properties: &[TransitionProperty],
|
||||||
timing_function: nsTimingFunctionBorrowed,
|
timing_function: nsTimingFunctionBorrowed,
|
||||||
style: &ComputedValues,
|
style: &ComputedValues,
|
||||||
properties_set_at_offset: &LonghandIdSet,
|
properties_set_at_offset: &LonghandIdSet,
|
||||||
offset: f32,
|
offset: Offset,
|
||||||
keyframes: RawGeckoKeyframeListBorrowedMut,
|
keyframes: RawGeckoKeyframeListBorrowedMut,
|
||||||
shared_lock: &SharedRwLock) {
|
shared_lock: &SharedRwLock) {
|
||||||
debug_assert!(offset == 0. || offset == 1.,
|
|
||||||
"offset should be 0. or 1.");
|
|
||||||
|
|
||||||
let needs_filling = all_properties.iter().any(|ref property| {
|
let needs_filling = all_properties.iter().any(|ref property| {
|
||||||
!properties_set_at_offset.has_transition_property_bit(property)
|
!properties_set_at_offset.has_transition_property_bit(property)
|
||||||
});
|
});
|
||||||
|
@ -2517,13 +2519,12 @@ fn fill_in_missing_keyframe_values(all_properties: &[TransitionProperty],
|
||||||
}
|
}
|
||||||
|
|
||||||
let keyframe = match offset {
|
let keyframe = match offset {
|
||||||
0. => unsafe {
|
Offset::Zero => unsafe {
|
||||||
Gecko_GetOrCreateInitialKeyframe(keyframes, timing_function)
|
Gecko_GetOrCreateInitialKeyframe(keyframes, timing_function)
|
||||||
},
|
},
|
||||||
1. => unsafe {
|
Offset::One => unsafe {
|
||||||
Gecko_GetOrCreateFinalKeyframe(keyframes, timing_function)
|
Gecko_GetOrCreateFinalKeyframe(keyframes, timing_function)
|
||||||
},
|
},
|
||||||
_ => unreachable!("offset should be 0. or 1."),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Append properties that have not been set at this offset.
|
// Append properties that have not been set at this offset.
|
||||||
|
@ -2652,7 +2653,7 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
inherited_timing_function,
|
inherited_timing_function,
|
||||||
style,
|
style,
|
||||||
&properties_set_at_start,
|
&properties_set_at_start,
|
||||||
0.,
|
Offset::Zero,
|
||||||
keyframes,
|
keyframes,
|
||||||
&global_style_data.shared_lock);
|
&global_style_data.shared_lock);
|
||||||
}
|
}
|
||||||
|
@ -2661,7 +2662,7 @@ pub extern "C" fn Servo_StyleSet_GetKeyframesForName(raw_data: RawServoStyleSetB
|
||||||
inherited_timing_function,
|
inherited_timing_function,
|
||||||
style,
|
style,
|
||||||
&properties_set_at_end,
|
&properties_set_at_end,
|
||||||
1.,
|
Offset::One,
|
||||||
keyframes,
|
keyframes,
|
||||||
&global_style_data.shared_lock);
|
&global_style_data.shared_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1072,34 +1072,6 @@ def run_lint_scripts(only_changed_files=False, progress=True, stylo=False):
|
||||||
yield error
|
yield error
|
||||||
|
|
||||||
|
|
||||||
def check_commits(path='.'):
|
|
||||||
""" Checks if the test is being run under Travis CI environment
|
|
||||||
This is necessary since, after travis clones the branch for a PR, it merges
|
|
||||||
the branch against master, creating a merge commit. Hence, as a workaround,
|
|
||||||
we have to check if the second last merge commit is done by the author of
|
|
||||||
the pull request.
|
|
||||||
"""
|
|
||||||
is_travis = os.environ.get('TRAVIS') == 'true'
|
|
||||||
number_commits = '-n2' if is_travis else '-n1'
|
|
||||||
|
|
||||||
"""Gets all commits since the last merge."""
|
|
||||||
args = ['git', 'log', number_commits, '--merges', '--format=%H:%an']
|
|
||||||
# last_merge stores both the commit hash and the author name of the last merge in the output
|
|
||||||
last_merge_hash, last_merge_author = subprocess.check_output(args, cwd=path).strip().splitlines()[-1].split(':')
|
|
||||||
args = ['git', 'log', '{}..HEAD'.format(last_merge_hash), '--format=%s']
|
|
||||||
commits = subprocess.check_output(args, cwd=path).lower().splitlines()
|
|
||||||
|
|
||||||
for commit in commits:
|
|
||||||
# .split() to only match entire words
|
|
||||||
if 'wip' in commit.split():
|
|
||||||
yield (':', ':', 'no commits should contain WIP')
|
|
||||||
|
|
||||||
if last_merge_author != 'bors-servo':
|
|
||||||
yield (':', ':', 'no merge commits allowed, please rebase your commits over the upstream master branch')
|
|
||||||
|
|
||||||
raise StopIteration
|
|
||||||
|
|
||||||
|
|
||||||
def scan(only_changed_files=False, progress=True, stylo=False):
|
def scan(only_changed_files=False, progress=True, stylo=False):
|
||||||
# check config file for errors
|
# check config file for errors
|
||||||
config_errors = check_config_file(CONFIG_FILE_PATH)
|
config_errors = check_config_file(CONFIG_FILE_PATH)
|
||||||
|
@ -1115,11 +1087,9 @@ def scan(only_changed_files=False, progress=True, stylo=False):
|
||||||
dep_license_errors = check_dep_license_errors(get_dep_toml_files(only_changed_files), progress)
|
dep_license_errors = check_dep_license_errors(get_dep_toml_files(only_changed_files), progress)
|
||||||
# other lint checks
|
# other lint checks
|
||||||
lint_errors = run_lint_scripts(only_changed_files, progress, stylo=stylo)
|
lint_errors = run_lint_scripts(only_changed_files, progress, stylo=stylo)
|
||||||
# check commits for WIP
|
|
||||||
commit_errors = [] if stylo else check_commits()
|
|
||||||
# chain all the iterators
|
# chain all the iterators
|
||||||
errors = itertools.chain(config_errors, directory_errors, lint_errors,
|
errors = itertools.chain(config_errors, directory_errors, lint_errors,
|
||||||
file_errors, dep_license_errors, commit_errors)
|
file_errors, dep_license_errors)
|
||||||
|
|
||||||
error = None
|
error = None
|
||||||
for error in errors:
|
for error in errors:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue