[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] [bug #29927] mtn clone removes existing bookkeeping dir
From: |
Thomas Keller |
Subject: |
[Monotone-devel] [bug #29927] mtn clone removes existing bookkeeping directory on failure |
Date: |
Fri, 21 May 2010 00:29:08 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 |
URL:
<http://savannah.nongnu.org/bugs/?29927>
Summary: mtn clone removes existing bookkeeping directory on
failure
Project: monotone
Submitted by: tommyd
Submitted on: Fr 21 Mai 2010 02:29:07 CEST
Category: working copy
Severity: 3 - Normal
Item Group: incorrect behavior
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
mtn version --full: 0.47 and before
_______________________________________________________
Details:
mtn clone allows to be executed in ".". When this directory contains a
monotone bookkeeping directory, the cloning is aborted, but the original _MTN
directory is also removed!
Here is why:
In case of a failure we want to clean up newly created files and directories
afterwards. We do this by using a directory cleanup helper which acts upon
destruction: it removes the complete directory if it did not exist previously
or alternatively only the _MTN directory for an existing directory. And the
last thing is the problem:
The helper is created before the workspace is attempted to be created, the
workspace now cannot be created because of an already existing _MTN directory
and the helper removes this directory as it has been told to do so.
Because of the code sharing and some new functionality this bug also affects
the setup command in the upcoming version 0.48. I can think of two ways to fix
this bug:
a) check for an existing bookkeeping directory separately before the cleanup
helper is created
b) don't allow setup / clone to be called for an existing directory
(I tend to a))
On a related note - clone uses the branch name as directory name for the
clone if no directory has been given explicitely while setup defaults to the
current directory (".") - do we want to unify these? I'd propose that both
fall back to the branch name as directory name.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?29927>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [Monotone-devel] [bug #29927] mtn clone removes existing bookkeeping directory on failure,
Thomas Keller <=