sapling
sapling copied to clipboard
`sl init` does not work on existing directories.
Unlike git init or hg init, sl init --git DIR results in an error if DIR already exists. This is even more puzzling as the directory argument is optional and defaults to the current directory, but you cannot actually omit it, because the current directory always exists.
A relevant use case is putting existing code under version control, i.e. doing sl init --git within an existing project directory.
A workaround is to do sl init --git some_new_tmpdir and then manually mv the .sl directory to the current directory and remove the temporary directory.