git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tupshin Harper <tupshin@tupshin.com>
To: Ray Lee <ray-lk@madrabbit.org>
Cc: Kevin Smith <yarcs@qualitycode.com>,
	git@vger.kernel.org, darcs-devel@darcs.net
Subject: Re: Darcs and git: plan of action
Date: Tue, 19 Apr 2005 16:38:32 -0700	[thread overview]
Message-ID: <42659678.9090605@tupshin.com> (raw)
In-Reply-To: <1113952916.29444.60.camel@orca.madrabbit.org>

Ray Lee wrote:

>it allows regular expressions for the match and replace, which means
>multiple unique tokens could change atomically. (Does anyone actually
>*use* regexes? Sounds like a cannon that'd be hard to aim.)
>  
>
Yes, and replace patches need to be used very carefully.

>Regardless, I only care about code, not free text. If it's in a language
>that doesn't do some use-'em-as-you-need-'em duck typing spiel
>(<cough>python</cough), then the context of your patch (namely, the
>file) already has those tokens somewhere in them. And I bet that if
>*you* looked at that file, you could tell if it was a replace or a mere
>textual diff. Am I wrong?
>  
>
Yes. See my hello world example from my last email.

>
>Unless I'm missing something, the darcs replace patch can already do the
>wrong thing. 
>
Yes, depending on how you define wrong. Darcs replace is fully 
predictable, and poorly chosen replaces can lead to incorrect results 
after future patches are applied.

>If I do a replace patch on a variable introduced in a local
>tree, then do a darcs replace on it before committing it to a shared
>repository, and coder B introduces a variable of the same original name
>in my copy, then there's a chance that the replace patch will
>incorrectly apply upon his newly introduced variable. No?
>  
>
Absolutely correct, and the exact reason why replace patches need to be 
used *very* selectively.

>  
>
>>It's provable that you can not.
>>    
>>
>
>I'm still not seeing the problem, at least when it comes to ANSI C.
>
>Ray
>  
>
See hello world example in my other email. You can argue that it is an 
existing problem in darcs, but really, it just points out the fact that 
a computer is *incapable* of knowing whether it is safe to use a replace 
patch based on a diff because replace patches are dangerous if not used 
intelligently.

-Tupshin

  reply	other threads:[~2005-04-19 23:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18 21:04 [darcs-devel] Darcs and git: plan of action linux
2005-04-19  0:07 ` Ray Lee
2005-04-19  1:05   ` Kevin Smith
2005-04-19  1:42     ` Ray Lee
2005-04-19  2:05       ` Kevin Smith
2005-04-19 22:08         ` Patrick McFarland
2005-04-19 22:40         ` Ray Lee
2005-04-19 23:00           ` Tupshin Harper
2005-04-19 23:21             ` Ray Lee
2005-04-19 23:38               ` Tupshin Harper [this message]
2005-04-19 23:03           ` [darcs-devel] " Kevin Smith
2005-04-19 23:06             ` Ray Lee
2005-04-19 23:32               ` Tupshin Harper
2005-04-20  1:11                 ` [darcs-devel] " Ray Lee
2005-04-20  7:52                   ` Juliusz Chroboczek
2005-04-20 11:55                   ` David Roundy
2005-04-20 17:11               ` Ralph Corderoy
2005-04-19 11:05       ` David Roundy
     [not found] <7ivf6lm594.fsf@lanthane.pps.jussieu.fr>
2005-04-18 12:20 ` David Roundy
2005-04-18 15:38   ` Linus Torvalds
2005-04-19 10:42     ` [darcs-devel] " David Roundy
2005-04-19 14:55       ` Linus Torvalds
2005-04-19 16:33         ` [darcs-devel] " Tupshin Harper
2005-04-19 16:49           ` Linus Torvalds
2005-04-20 11:14             ` David Roundy
2005-04-19  0:55   ` Juliusz Chroboczek
2005-04-19 11:04     ` [darcs-devel] " David Roundy
2005-04-19 12:20       ` Juliusz Chroboczek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42659678.9090605@tupshin.com \
    --to=tupshin@tupshin.com \
    --cc=darcs-devel@darcs.net \
    --cc=git@vger.kernel.org \
    --cc=ray-lk@madrabbit.org \
    --cc=yarcs@qualitycode.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).