======Applications - Version Control - Fossil - Notes======= See also [[applications:versioncontrol#fossil]] Create new repository: fossil init myrepo.fossil You'll get output similar to: project-id: /Long number/ server-id: /Another long number/ admin-user: username (initial password is "123456") Set up the server: fossil server myrepo.fossil You'll get output similar to: Listening for HTTP requests on TCP port 8080 Type Ctrl-C to stop the HTTP server Prepare the client. - Clone the server repository: fossil clone http://username:123456@host.domain.com:8080/ myclone.fossil - Open the cloned repository: fossil open myclone.fossil - Check in files, they should be immediately synced to the server by autosync. To disable autosync: fossil setting autosync off To enable autosync fossil setting autosync on To check the current autosync setting: fossil setting autosync To set Notepad to be the default editor for commit messages (for use on Windows): fossil setting editor notepad.exe ====List users==== List users: fossil user list -R file.fossil List rights of user: fossil user capabilities anonymous -R file.fossil ====Registered users only==== Remove rights for anonymous and nobody: fossil user capabilities anonymous "" -R file.fossil fossil user capabilities nobody "" -R fea.fossil ====Add new user==== fossil user new username contact-info password ====Grant all rights except create users and super-user==== fossil user capabilities username bcfhgjmnoruvxz -R file.fossil ====Set password==== fossil user password username newpassword -R file.fossil =====Bazaar-to-Fossil.cmd===== Extracts all revisions from a bazaar repository and commits each revision to a fossil repository. \\ Be warned: This script has received only very minimal testing so far. \\ Both bazaar and fossil executables should be in the %PATH%. As this was for a bazaar repository with .cmd and .vbs files, the following option had to be set to prevent the fossil prompts about CR/LF at commit time: fossil setting crnl-glob '*' SET BZRREPODIR=I:\Scripts SET BZRTMPDIR=C:\Dump\ScriptsTMP SET FOSSILREPODIR=C:\Dump\Scripts2 SET TMPDIR=C:\Dump SET STARTREV=1 IF "%1" NEQ "" SET STARTREV=%1 IF NOT EXIST "%TMPDIR%" MKDIR "%TMPDIR%" CD /D "%BZRREPODIR%" FOR /F "tokens=*" %%S IN ('bzr revno') DO ( FOR /L %%D IN (%STARTREV%,1,%%S) DO ( IF EXIST "%BZRTMPDIR%" RD /S /Q %BZRTMPDIR% MKDIR "%BZRTMPDIR%" CD /D "%BZRREPODIR%" bzr log -r%%D > "%TMPDIR%\r%%D.txt" bzr export -r %%D --per-file-timestamps "%BZRTMPDIR%" "%SYSTEMROOT%\system32\xcopy.exe" /EY "%BZRTMPDIR%" "%FOSSILREPODIR%" CD /D "%TMPDIR%" CD /D "%FOSSILREPODIR%" fossil add * fossil commit --message-file "%TMPDIR%\r%%D.txt" ) ) IF EXIST "%BZRTMPDIR%" RD /S /Q %BZRTMPDIR% DEL /Q "%TMPDIR%\r*.txt" =====Compile Fossil on Windows with SSL support===== See [[applications:fossil:compileonwindowswithssl]].