Mercurial > public > mercurial-scm > hg-stable
comparison rust/rhg/src/commands/debugdata.rs @ 49494:0199712c7a6d
rhg: fallback in `debugdata` if repo has `narrow`
Narrow uses ellipsis nodes and debugdata does not understand them yet.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 11 Jul 2022 17:44:03 +0200 |
parents | 5ce2aa7c2ad5 |
children | 37bc3edef76f |
comparison
equal
deleted
inserted
replaced
49493:6193e846cb65 | 49494:0199712c7a6d |
---|---|
53 unreachable!("Should not happen since options are required") | 53 unreachable!("Should not happen since options are required") |
54 } | 54 } |
55 }; | 55 }; |
56 | 56 |
57 let repo = invocation.repo?; | 57 let repo = invocation.repo?; |
58 if repo.has_narrow() { | |
59 return Err(CommandError::unsupported( | |
60 "support for ellipsis nodes is missing and repo has narrow enabled", | |
61 )); | |
62 } | |
58 let data = debug_data(repo, rev, kind).map_err(|e| (e, rev))?; | 63 let data = debug_data(repo, rev, kind).map_err(|e| (e, rev))?; |
59 | 64 |
60 let mut stdout = invocation.ui.stdout_buffer(); | 65 let mut stdout = invocation.ui.stdout_buffer(); |
61 stdout.write_all(&data)?; | 66 stdout.write_all(&data)?; |
62 stdout.flush()?; | 67 stdout.flush()?; |