[darcs-users] making add/remove file commute with content change

Ben Franksen ben.franksen at online.de
Tue Nov 27 17:43:46 UTC 2007


Petr Rockai wrote:
> Ben Franksen <ben.franksen at online.de> writes:
>> *darcs should allow to record changes to the content of a file that has
>> been removed (or wasn't even added in the first place)*
> [snip]
>> What do you think?
> 
> Well, I think this is a good idea. 

Good!

> I think I may have already 
> mentioned this somewhere, but what I do to work around the problem: I
> create an _attic directory, and instead of any darcs rm i do darcs mv
> underneath _attic. This makes "removal" commutable with changes and
> moves, and makes resurrection again easy and commutable. 

This is a nice idea for a work-around. I'll try this next time.

> So what you 
> basically ask for is that add/remove are implemented by disabling and
> enabling the file in the tree, right?

Right.

> One problem I can see with that is addressing the "removed" (or
> non-"added") files. You still need some sort of name for the file,
> when it "does not exist" in the repository. Further ideas?

I'd say it's referenced via path/filename like any other file, just /as if/
it would (still) live there (even though it doesn't). I would like to be
able to  darcs mv  it like a normal (existing) file.

I think implementing this would not be too hard. As you said above, one
would need a flag 'existing' for each file system object under darcs
control.

Cheers
Ben



More information about the darcs-users mailing list