Fossil

Check-in [804bb55f]
Login

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

Overview
Comment:Enhance verbosity of the new 'test-file-environment' command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1:804bb55f0756bf2e452722ad12a5cf0581484792
User & Date: mistachkin 2017-02-14 00:03:52
Context
2017-02-14
00:13
Further enhancements. check-in: a3409470 user: mistachkin tags: symlinks
00:03
Enhance verbosity of the new 'test-file-environment' command. check-in: 804bb55f user: mistachkin tags: symlinks
2017-02-13
23:56
Add the 'test-file-environment' test command. check-in: c891d86c user: mistachkin tags: symlinks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

966
967
968
969
970
971
972
973
974
975
976
977
978
979








980
981
982
983
984
985
986
    char zBuf[100];
    const char *zName = g.argv[i];
    struct fossilStat testFileStat;
    file_canonical_name(zName, &x, slashFlag);
    fossil_print("[%s] -> [%s]\n", zName, blob_buffer(&x));
    blob_reset(&x);
    memset(&testFileStat, 0, sizeof(struct fossilStat));
    rc = fossil_stat(zName, &testFileStat, 1, 1);
    fossil_print("  stat_rc     = %d\n", rc);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
    fossil_print("  file_size   = %s\n", zBuf);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_mtime);
    fossil_print("  file_mtime  = %s\n", zBuf);
    fossil_print("  file_mode   = %d\n", testFileStat.st_mode);








  }
}

/*
** COMMAND: test-canonical-name
**
** Usage: %fossil test-canonical-name FILENAME...







|
|

|

|
|
>
>
>
>
>
>
>
>







966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
    char zBuf[100];
    const char *zName = g.argv[i];
    struct fossilStat testFileStat;
    file_canonical_name(zName, &x, slashFlag);
    fossil_print("[%s] -> [%s]\n", zName, blob_buffer(&x));
    blob_reset(&x);
    memset(&testFileStat, 0, sizeof(struct fossilStat));
    rc = fossil_stat(zName, &testFileStat, 0, 0);
    fossil_print("  stat_rc      = %d\n", rc);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
    fossil_print("  file_size    = %s\n", zBuf);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_mtime);
    fossil_print("  file_mtime   = %s\n", zBuf);
    fossil_print("  file_mode    = %d\n", testFileStat.st_mode);
    memset(&testFileStat, 0, sizeof(struct fossilStat));
    rc = fossil_stat(zName, &testFileStat, 1, 1);
    fossil_print("  l_stat_rc    = %d\n", rc);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_size);
    fossil_print("  l_file_size  = %s\n", zBuf);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%lld", testFileStat.st_mtime);
    fossil_print("  l_file_mtime = %s\n", zBuf);
    fossil_print("  l_file_mode  = %d\n", testFileStat.st_mode);
  }
}

/*
** COMMAND: test-canonical-name
**
** Usage: %fossil test-canonical-name FILENAME...