|
Created on 2009-09-11.16:04:05 by SamB, last changed 2017-07-30.23:18:07 by gh.
msg8788 (view) |
Author: SamB |
Date: 2009-09-11.16:03:57 |
|
Apparently, "darcs diff" does nothing but, for each path in the union of the new
and old trees' file paths, run diff between that name in the old tree and that
name in the new tree.
For example:
naesten@hydrogen:~/.emacs/dvc/darcstest% darcs whatsnew
move ./bar ./baz
addfile ./bar
hunk ./bar 1
+bar
hunk ./baz 1
-bar
+baz
hunk ./foo 1
-foo
rmfile ./foo
naesten@hydrogen:~/.emacs/dvc/darcstest% darcs diff
diff -rN -u old-darcstest/baz new-darcstest/baz
--- old-darcstest/baz 1969-12-31 19:00:00.000000000 -0500
+++ new-darcstest/baz 2009-09-11 12:02:21.000000000 -0400
@@ -0,0 +1 @@
+baz
diff -rN -u old-darcstest/foo new-darcstest/foo
--- old-darcstest/foo 2009-09-11 12:02:21.000000000 -0400
+++ new-darcstest/foo 1969-12-31 19:00:00.000000000 -0500
@@ -1 +0,0 @@
-foo
|
msg8813 (view) |
Author: kowey |
Date: 2009-09-14.14:32:07 |
|
I think it's worthwhile to try and fix this over the long run.
This bug requires research action:
1. Are we actually just doing diff -r?
2. Would it cost us a lot to do individual diffs?
3. What about --diff-command; does that mean we lose repository-based diffs?
See also issue1201. I suspect we also need to find a sane way to balance the
desire for repo-wide diffs with the precision of file-move tracking. (For
example, an ugly thing darcs could do is add noise to a file saying "HEY! This
file was actually renamed from foo to bar") that a graphical diff tool could
pick up.)
|
msg8821 (view) |
Author: SamB |
Date: 2009-09-15.17:59:35 |
|
On Mon, Sep 14, 2009 at 10:32 AM, Eric Kow <bugs@darcs.net> wrote:
> 1. Are we actually just doing diff -r?
Whatever it is, it seems to have a very similar result -- but doesn't
diff -r use more blank lines?
> 2. Would it cost us a lot to do individual diffs?
I doubt it; we wouldn't need to do any diffs at all for unchanged files ...
> 3. What about --diff-command; does that mean we lose repository-based diffs?
I figure that just means you run the diff command on each pair of
source/dest, where source/dest are possibly at different paths within
their repositories; I'm not sure what should be done for added/removed
files, though.
Or possibly I don't understand what you mean ?
|
msg8828 (view) |
Author: kowey |
Date: 2009-09-16.12:38:44 |
|
On Tue, Sep 15, 2009 at 17:59:38 +0000, Samuel Bronson wrote:
> > 2. Would it cost us a lot to do individual diffs?
>
> I doubt it; we wouldn't need to do any diffs at all for unchanged files ...
That's a good point which I had not considered.
It also relieves some of my concerns about diff-command below.
Thanks!
> > 3. What about --diff-command; does that mean we lose repository-based diffs?
> I figure that just means you run the diff command on each pair of
> source/dest, where source/dest are possibly at different paths within
> their repositories; I'm not sure what should be done for added/removed
> files, though.
Tools like Apple's opendiff and meld can do a directory-wide diff, which
is actually quite handy. I think I was just worried about an
interaction where darcs automatically spawns a new diff window for each
file that's changed.
Now that you've brought up the point about unchanged files, I think it
makes sense for somebody to just roll up their sleeves and try tackling
this (no big open questions to answer). The same person could also do
us a big favour by sorting a bunch of other minor issues calling
--external-merge.
|
|
Date |
User |
Action |
Args |
2009-09-11 16:04:05 | SamB | create | |
2009-09-14 14:32:09 | kowey | set | priority: bug status: unknown -> needs-reproduction messages:
+ msg8813 nosy:
+ kowey |
2009-09-15 17:59:38 | SamB | set | nosy:
kowey, darcs-devel, SamB, dmitry.kurochkin messages:
+ msg8821 |
2009-09-16 12:38:46 | kowey | set | status: needs-reproduction -> needs-implementation nosy:
kowey, darcs-devel, SamB, dmitry.kurochkin priority: bug -> feature messages:
+ msg8828 title: darcs diff does not interact well with renames, adds, or removals -> handle renames (and adds/removes) in darcs diff |
2017-07-30 23:18:07 | gh | set | status: needs-implementation -> given-up |
|