darcs repository web UI and hosting app. This is the main darcsden trunk, which also runs hub.darcs.net. (https://hub.darcs.net)
#39Dirty state after failed fork
I've tried to fork both darcs/darcs-screened and darcs/darcs-reviewed with no success (the error message is not very informative), and then I tried to fork them again. The second fork fails with the following message: «Directory or file named '/home/darcsden/users/iago/darcs-reviewed' already exists.». So it looks like the fork operation is not atomic as it should be.
I can confirm that this issue still exists(18/01/2013). I am trying to fork this(simon's darcsden) repo.<<"Directory or file named '/home/darcsden/users/Aditya/darcsden' already exists.">>
There is a patch in development for this.
I think this was a workaround: http://hub.darcs.net/simon/darcsden/patch/20130120083626-ae621
I think this is the patch in question.
And some code review comments:
Here are some related ideas inspired by your fix:
make forking atomic, so that it never leaves stray directories if it fails, and we don't need to create repos with undesired suffixes (and later clean them up).
when adding a numeric suffix, show an alert explaining why it happened
show a valid unique repo name as default in the fork form (currently it adds a hyphen but not a number)
bring darcs and darcsden uniqueness suffixes into harmony (darcs uses underscore, darcsden suggests hyphen and now also uses underscore).
- status set to closed
Resolved by Aditya's fix.