From fc51908dbacc0841e5f0103a67249a7dde7acaf4 Mon Sep 17 00:00:00 2001 From: Xavier Deguillard Date: Fri, 13 Mar 2020 19:34:45 -0700 Subject: [PATCH] pyworker: empty flags are valid Summary: Empty flags can be sent by Mercurial, do not error out in that case. Reviewed By: quark-zju Differential Revision: D20450124 fbshipit-source-id: c85af42be2afb95b09057583f6fec3a2a13d478a --- eden/scm/edenscmnative/bindings/modules/pyworker/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eden/scm/edenscmnative/bindings/modules/pyworker/src/lib.rs b/eden/scm/edenscmnative/bindings/modules/pyworker/src/lib.rs index f22e93362e..a9fd71a5fe 100644 --- a/eden/scm/edenscmnative/bindings/modules/pyworker/src/lib.rs +++ b/eden/scm/edenscmnative/bindings/modules/pyworker/src/lib.rs @@ -406,6 +406,8 @@ py_class!(class writerworker |py| { Some(UpdateFlag::Symlink) } else if flags == "x" { Some(UpdateFlag::Executable) + } else if flags == "" { + None } else { return Err(format_err!("Unknown flags: {}", flags)).map_pyerr(py); };