monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] mtn copy anyone?


From: Ben Walton
Subject: Re: [Monotone-devel] mtn copy anyone?
Date: Fri, 17 Aug 2007 09:03:09 -0400

On 8/17/07, Brian May <address@hidden> wrote:
> >>>>> "Nathaniel" == Nathaniel Smith <address@hidden> writes:
>
>     Nathaniel> It could just be equivalent to "cp foo bar; mtn add
>     Nathaniel> bar".
>
> Make that cp foo bar && mtn add bar
>
> We don't want the add to proceed if the copy failed.

Agreed.

> If there was such a command, I would use it (I am not arguing there
> should be such a command though; it would also be easy to create a
> shell alias)

A shell alias would work, but wouldn't necessarily be available to all
users.  We could distribute a .bash_mtn, .csh_mtn, etc (for all shells
with different syntax) in contrib/, but that would be redundant and
require the user to integrate the sourcing of that script into their
profile.

>
>     Nathaniel>  It could somehow record something special in the
>     Nathaniel> history.  This special thing could be nothing but a bit
>     Nathaniel> of metadata that was exactly equivalent to an add for
>     Nathaniel> history tracking purposes, but that, say, 'log' and
>     Nathaniel> 'annotate' did something smarter with.  Or it could
>
> Automatically add to the log message for the next commit "This file
> derived from file /path/to/file <fileid> in revision <revisionid>"?
>
>     Nathaniel> actually affect the history model -- then there are
>     Nathaniel> questions like how it works through merging.  This is
>     Nathaniel> unclear too; there are a few alternative, contradictory
>     Nathaniel> "natural" semantics for copy WRT merge.  (There's a
>     Nathaniel> little about this at
>     Nathaniel> http://www.venge.net/mtn-wiki/HistoryBlueSky.)
>
> I would prefer we stayed out of this mess. Don't explicitly track
> history, but maybe record some sort of pointer indicating where the
> file came from, if required.
>
> Or maybe track history, but only for some commands like annotate, and
> definitely not merging. This might be confusing though.

I don't have a personal preference here, either way, which is why I
posted the various options available.  If we were to avoid the
history/merging aspects, I wonder if using the lua machinery that is
called on a missing command to create a mtn based alias (as opposed to
an external shell based one) would be the way to go for this...at the
very least, that would all users to 'play' without requiring
integration of shell aliases, etc.  I'm not sure if that lua
functionality has turned up in nvm yet though or is in a usable state.
 I guess an explicit command in cmd_*cc wouldn't be that bad either...

-Ben
-- 
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <address@hidden>

When one person suffers from a delusion, it is called insanity. When
many people suffer from a delusion it is called Religion.
Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance

---------------------------------------------------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]