##// END OF EJS Templates
rhg: Sub-repositories are not supported...
Simon Sapin -
r49341:7f633432 default
parent child Browse files
Show More
@@ -417,6 +417,14 b' impl Repo {'
417 417 )
418 418 }
419 419
420 pub fn has_subrepos(&self) -> Result<bool, DirstateError> {
421 if let Some(entry) = self.dirstate_map()?.get(HgPath::new(".hgsub"))? {
422 Ok(entry.state().is_tracked())
423 } else {
424 Ok(false)
425 }
426 }
427
420 428 pub fn filelog(&self, path: &HgPath) -> Result<Filelog, HgError> {
421 429 Filelog::open(self, path)
422 430 }
@@ -29,7 +29,7 b' fn main_with_result('
29 29 repo: Result<&Repo, &NoRepoInCwdError>,
30 30 config: &Config,
31 31 ) -> Result<(), CommandError> {
32 check_unsupported(config, ui)?;
32 check_unsupported(config, repo, ui)?;
33 33
34 34 let app = App::new("rhg")
35 35 .global_setting(AppSettings::AllowInvalidUtf8)
@@ -643,6 +643,7 b' fn check_extensions(config: &Config) -> '
643 643
644 644 fn check_unsupported(
645 645 config: &Config,
646 repo: Result<&Repo, &NoRepoInCwdError>,
646 647 ui: &ui::Ui,
647 648 ) -> Result<(), CommandError> {
648 649 check_extensions(config)?;
@@ -653,6 +654,12 b' fn check_unsupported('
653 654 Err(CommandError::unsupported("$HG_PENDING"))?
654 655 }
655 656
657 if let Ok(repo) = repo {
658 if repo.has_subrepos()? {
659 Err(CommandError::unsupported("sub-repositories"))?
660 }
661 }
662
656 663 if config.has_non_empty_section(b"encode") {
657 664 Err(CommandError::unsupported("[encode] config"))?
658 665 }
@@ -1,7 +1,3 b''
1 TODO: fix rhg bugs that make this test fail when status is enabled
2 $ unset RHG_STATUS
3
4
5 1 $ cat >> $HGRCPATH <<EOF
6 2 > [extdiff]
7 3 > # for portability:
@@ -1,7 +1,3 b''
1 TODO: fix rhg bugs that make this test fail when status is enabled
2 $ unset RHG_STATUS
3
4
5 1 $ hg init repo
6 2 $ cd repo
7 3 $ hg init subrepo
General Comments 0
You need to be logged in to leave comments. Login now