Created on 2007-04-18.19:47:56 by kowey, last changed 2009-08-27.14:11:43 by admin.
msg1638 (view) |
Author: kowey |
Date: 2007-04-18.19:47:46 |
|
Due to the behaviour of renameFile and renameDirectory, which silently
replace things that already exist. We probably should *not* do this,
the basic principle being not to harm anything that doesn't belong to
us.
mkdir x
cd x; darcs init
touch a
darcs add a
darcs record -am 'a'
cd ..
darcs get x x2
cd x2
echo 'hi' > b
cd ..
cd x
darcs mv a b
darcs record -am 'a -> b'
cd ..
cd x2
darcs pull
echo 'hi' > good-b
diff good-b b
cd ..
Note that not silently renaming the file/directory could also be bad
for darcs (because then maybe it can't apply future patches), but
better for darcs to give up than just overwrite the user's stuff.
Also, this might make more sense within the context of a repaired
issue434, don't want to give darcs any more excuses to just up and
die in the middle of a pull.
|
msg1640 (view) |
Author: droundy |
Date: 2007-04-18.19:53:54 |
|
On Wed, Apr 18, 2007 at 07:47:57PM +0000, Eric Kow wrote:
> Due to the behaviour of renameFile and renameDirectory, which silently
> replace things that already exist. We probably should *not* do this,
> the basic principle being not to harm anything that doesn't belong to
> us.
Agreed. I would recommend trying to rename the file or directory that's
in the way--but only if we're doing this tolerantly, otherwise we should
exit with an error. I believe we've got some code already in Lock to
select a new filename based on an existing one, so we could go for
something like "badname.oldversion" or "badname.oldversion.1" etc.
> Also, this might make more sense within the context of a repaired
> issue434, don't want to give darcs any more excuses to just up and
> die in the middle of a pull.
Yes, I agree, the two changes should go in together.
--
David Roundy
Department of Physics
Oregon State University
|
msg2236 (view) |
Author: kowey |
Date: 2007-11-04.22:54:01 |
|
The unstable branch now has a feature for backing up files in the working
directory before clobbering them. That should solve the problem.
Tue Aug 21 07:19:42 CEST 2007 Eric Kow <eric.kow@loria.fr>
* [issue319, issue440] Backup unmanged working dir files as needed.
|
|
Date |
User |
Action |
Args |
2007-04-18 19:47:56 | kowey | create | |
2007-04-18 19:53:56 | droundy | set | status: unread -> unknown nosy:
droundy, tommy, beschmi, kowey messages:
+ msg1640 |
2007-07-16 11:24:02 | kowey | set | topic:
+ ProbablyEasy nosy:
droundy, tommy, beschmi, kowey |
2007-08-09 07:21:39 | kowey | set | superseder:
+ Pull/apply can overwrite files that are not owned by darcs |
2007-11-04 22:54:01 | kowey | set | status: unknown -> resolved-in-unstable messages:
+ msg2236 |
2007-11-17 11:14:26 | kowey | set | status: resolved-in-unstable -> resolved-in-stable |
2008-09-16 21:30:59 | admin | set | status: resolved-in-stable -> resolved nosy:
+ dagit |
2009-08-06 17:34:11 | admin | set | nosy:
+ markstos, jast, Serware, dmitry.kurochkin, darcs-devel, zooko, mornfall, simon, thorkilnaur, - droundy |
2009-08-06 20:31:31 | admin | set | nosy:
- beschmi |
2009-08-10 22:03:19 | admin | set | nosy:
- markstos, darcs-devel, zooko, jast, Serware, mornfall |
2009-08-11 00:00:19 | admin | set | nosy:
- dagit |
2009-08-25 17:48:50 | admin | set | nosy:
+ darcs-devel, - simon |
2009-08-27 14:11:43 | admin | set | nosy:
tommy, kowey, darcs-devel, thorkilnaur, dmitry.kurochkin |
|