1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
|
**
** Show the status of a "git export".
*/
void gitmirror_status_command(void){
char *zMirror;
char *z;
int n, k;
db_find_and_open_repository(0, 0);
verify_all_options();
zMirror = db_get("last-git-export-repo", 0);
if( zMirror==0 ){
fossil_print("Git mirror: none\n");
return;
}
fossil_print("Git mirror: %s\n", zMirror);
db_multi_exec("ATTACH '%q/.mirror_state/db' AS mirror;", zMirror);
z = db_text(0, "SELECT datetime(value) FROM mconfig WHERE key='start'");
if( z ){
double rAge = db_double(0.0, "SELECT julianday('now') - value"
" FROM mconfig WHERE key='start'");
if( rAge>1.0/86400.0 ){
|
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
|
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
|
**
** Show the status of a "git export".
*/
void gitmirror_status_command(void){
char *zMirror;
char *z;
int n, k;
int bQuiet = 0;
int bByAll = 0; /* Undocumented option meaning this command was invoked
** from "fossil all" and should modify output accordingly */
db_find_and_open_repository(0, 0);
bQuiet = find_option("quiet","q",0)!=0;
bByAll = find_option("by-all",0,0)!=0;
verify_all_options();
zMirror = db_get("last-git-export-repo", 0);
if( zMirror==0 ){
if( !bQuiet && !bByAll ){
fossil_print("Git mirror: none\n");
}
return;
}
if( bByAll ){
size_t len = strlen(g.zRepositoryName);
int n;
if( len>60 ) len = 60;
n = (int)(65 - len);
fossil_print("%.12c %s %.*c\n", '*', g.zRepositoryName, n, '*');
}
fossil_print("Git mirror: %s\n", zMirror);
db_multi_exec("ATTACH '%q/.mirror_state/db' AS mirror;", zMirror);
z = db_text(0, "SELECT datetime(value) FROM mconfig WHERE key='start'");
if( z ){
double rAge = db_double(0.0, "SELECT julianday('now') - value"
" FROM mconfig WHERE key='start'");
if( rAge>1.0/86400.0 ){
|
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
|
** > fossil git import MIRROR
**
** TBD...
**
** > fossil git status
**
** Show the status of the current Git mirror, if there is one.
*/
void gitmirror_command(void){
char *zCmd;
int nCmd;
if( g.argc<3 ){
usage("export ARGS...");
}
|
>
>
|
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
|
** > fossil git import MIRROR
**
** TBD...
**
** > fossil git status
**
** Show the status of the current Git mirror, if there is one.
**
** -q|--quiet No output if there is nothing to report
*/
void gitmirror_command(void){
char *zCmd;
int nCmd;
if( g.argc<3 ){
usage("export ARGS...");
}
|