[darcs-users] post-hoc move
Dan Pascu
dan at ag-projects.com
Fri Jul 31 17:59:42 UTC 2009
On Friday 31 July 2009, Hamish Allan wrote:
> On Fri, Jul 31, 2009 at 7:05 AM, Dan Pascu<dan at ag-projects.com> wrote:
>
> > On Thursday 30 July 2009, Hamish Allan wrote:
> >
> >> Personally, I don't think "darcs move" should do the actual physical
> >> move at all. "darcs add" doesn't physically create a file; "darcs
> >> remove" doesn't physically delete one. Likewise, "darcs move" should
> >> simply mean "change your concept of what this file is called".
> >
> > I disagree. From a usability point of view, this would be a regression, as
it
> > would always require me to type 2 commands to do the operation.
>
> Okay, let me revise my position to: I think it would be *really*
> useful to have a switch to darcs move so that I can type "darcs move
> -retrospectively $LOC1 $LOC2" after I've already moved $LOC1 to $LOC2.
That is indeed a better choice.
>
> > Of course with
> > add it doesn't add the file because it cannot create one out of thin air.
>
> Of course it can. Try typing "touch newfile" at your unix shell
I meant a file with the desired content already present. The point is you
already have the file before you want to add it to version control.
Of course it can create an empty file on add, but that is an uninteresting
case.
> But most of the time, you want to add the file after it's already
> created. Why? Because you've already used another tool to create the
> file, e.g., a text editor.
Exactly.
> For exactly the same reason, it would be useful to apply a move
> retrospectively.
I was no disagreeing with you. I was just against changing move to only do the
meta change and then require you to mv file1 file2 at the shell level. That
not only would require typing 2 commands to get a thing done, it's also error
prone as one may mistype the filenames on the second command resulting in a
mess. Of course a switch to darcs mv to do that is fine.
--
Dan
More information about the darcs-users
mailing list