Fossil SCM

Make fusefs a 2nd-tier command if it is not supported by the build

baruch 2016-01-26 09:18 pending-review
Commit 50d81f95041f631e8a14b1a0e0afd52b3882638e
1 file changed +36
+36
--- src/fusefs.c
+++ src/fusefs.c
@@ -335,6 +335,42 @@
335335
g.localOpen = 0; /* Prevent tags like "current" and "prev" */
336336
fuse_main(4, azNewArgv, &fusefs_methods, NULL);
337337
fusefs_reset();
338338
fusefs_clear_path();
339339
}
340
+#else
341
+
342
+/*
343
+** COMMAND: fusefs*
344
+**
345
+** Usage: %fossil fusefs [--debug] DIRECTORY
346
+**
347
+** THIS BUILD OF FOSSIL DOES NOT SUPPORT THE FUSE FILESYSTEM!
348
+**
349
+** This command uses the Fuse Filesystem to mount a directory at
350
+** DIRECTORY that contains the content of all check-ins in the
351
+** repository. The names of files are DIRECTORY/checkins/VERSION/PATH
352
+** where DIRECTORY is the root of the mount, VERSION is any valid
353
+** check-in name (examples: "trunk" or "tip" or a tag or any unique
354
+** prefix of a SHA1 hash, etc) and PATH is the pathname of the file
355
+** in the check-in. If DIRECTORY does not exist, then an attempt is
356
+** made to create it.
357
+**
358
+** The DIRECTORY/checkins directory is not searchable so one cannot
359
+** do "ls DIRECTORY/checkins" to get a listing of all possible check-in
360
+** names. There are countless variations on check-in names and it is
361
+** impractical to list them all. But all other directories are searchable
362
+** and so the "ls" command will work everywhere else in the fusefs
363
+** file hierarchy.
364
+**
365
+** The FuseFS typically only works on Linux, and then only on Linux
366
+** systems that have the right kernel drivers and have install the
367
+** appropriate support libraries.
368
+**
369
+** After stopping the "fossil fusefs" command, it might also be necessary
370
+** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it
371
+** again.
372
+*/
373
+void fusefs_cmd(void){
374
+ fossil_fatal("this build of fossil does not support the fuse filesystem");
375
+}
340376
#endif /* FOSSIL_HAVE_FUSEFS */
341377
--- src/fusefs.c
+++ src/fusefs.c
@@ -335,6 +335,42 @@
335 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
336 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
337 fusefs_reset();
338 fusefs_clear_path();
339 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340 #endif /* FOSSIL_HAVE_FUSEFS */
341
--- src/fusefs.c
+++ src/fusefs.c
@@ -335,6 +335,42 @@
335 g.localOpen = 0; /* Prevent tags like "current" and "prev" */
336 fuse_main(4, azNewArgv, &fusefs_methods, NULL);
337 fusefs_reset();
338 fusefs_clear_path();
339 }
340 #else
341
342 /*
343 ** COMMAND: fusefs*
344 **
345 ** Usage: %fossil fusefs [--debug] DIRECTORY
346 **
347 ** THIS BUILD OF FOSSIL DOES NOT SUPPORT THE FUSE FILESYSTEM!
348 **
349 ** This command uses the Fuse Filesystem to mount a directory at
350 ** DIRECTORY that contains the content of all check-ins in the
351 ** repository. The names of files are DIRECTORY/checkins/VERSION/PATH
352 ** where DIRECTORY is the root of the mount, VERSION is any valid
353 ** check-in name (examples: "trunk" or "tip" or a tag or any unique
354 ** prefix of a SHA1 hash, etc) and PATH is the pathname of the file
355 ** in the check-in. If DIRECTORY does not exist, then an attempt is
356 ** made to create it.
357 **
358 ** The DIRECTORY/checkins directory is not searchable so one cannot
359 ** do "ls DIRECTORY/checkins" to get a listing of all possible check-in
360 ** names. There are countless variations on check-in names and it is
361 ** impractical to list them all. But all other directories are searchable
362 ** and so the "ls" command will work everywhere else in the fusefs
363 ** file hierarchy.
364 **
365 ** The FuseFS typically only works on Linux, and then only on Linux
366 ** systems that have the right kernel drivers and have install the
367 ** appropriate support libraries.
368 **
369 ** After stopping the "fossil fusefs" command, it might also be necessary
370 ** to run "fusermount -u DIRECTORY" to reset the FuseFS before using it
371 ** again.
372 */
373 void fusefs_cmd(void){
374 fossil_fatal("this build of fossil does not support the fuse filesystem");
375 }
376 #endif /* FOSSIL_HAVE_FUSEFS */
377

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button