Fossil

Check-in [038dcc00]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Report an error if the input file to "fossil import" cannot be opened.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:038dcc00e5ead3af8416cb5d16f6535ac9671bf030db963300089b851dc068da
User & Date: drh 2017-06-30 19:00:41
Context
2017-06-30
19:59
Add the --numstat option to the diff command. check-in: 3d6cf6a7 user: drh tags: trunk
19:00
Report an error if the input file to "fossil import" cannot be opened. check-in: 038dcc00 user: drh tags: trunk
18:56
Fix the zlib Makefile for MSVC to use /MT to avoid a compiler warning. check-in: 0f8bae07 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/import.c.

1733
1734
1735
1736
1737
1738
1739

1740
1741
1742
1743
1744
1745
1746
  verify_all_options();

  if( g.argc!=3 && g.argc!=4 ){
    usage("--git|--svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?");
  }
  if( g.argc==4 ){
    pIn = fossil_fopen(g.argv[3], "rb");

  }else{
    pIn = stdin;
    fossil_binary_mode(pIn);
  }
  if( !incrFlag ){
    if( forceFlag ) file_delete(g.argv[2]);
    db_create_repository(g.argv[2]);







>







1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
  verify_all_options();

  if( g.argc!=3 && g.argc!=4 ){
    usage("--git|--svn ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?");
  }
  if( g.argc==4 ){
    pIn = fossil_fopen(g.argv[3], "rb");
    if( pIn==0 ) fossil_fatal("cannot open input file \"%s\"", g.argv[3]);
  }else{
    pIn = stdin;
    fossil_binary_mode(pIn);
  }
  if( !incrFlag ){
    if( forceFlag ) file_delete(g.argv[2]);
    db_create_repository(g.argv[2]);