diff on a whole directory

0 views
Skip to first unread message

Steven Woody

unread,
Dec 8, 2008, 10:03:03 PM12/8/08
to Vim
Hi,

I want to compare difference of two whole directory (with
subdirectories). Is vimdiff help in this case? I know, there is a
program winmrege on windows can do this task, but I am finding a
solution on Linux. Any suggest will be highly appreciated.

Thanks.

-
narke

tanaka tarou

unread,
Dec 8, 2008, 10:12:29 PM12/8/08
to vim...@googlegroups.com
DirDiff.vim
 
 
This page is written in Japanese, but I think the screenshot can give you some hint ?

sc

unread,
Dec 8, 2008, 10:26:26 PM12/8/08
to vim...@googlegroups.com
i don't remember where i got them but i have two python
scripts: dirdiff.py and diffall.py i use for this purpose

google shows over 5,000 hits and none look familiar -- if
you are interested, and can't find them, i can post them
here or somewhere, but the names will probably suffice for
you to find them

sc


Marc Weber

unread,
Dec 8, 2008, 11:11:18 PM12/8/08
to vim...@googlegroups.com, Vim

diff -R foo/ bar/ | vim or such..
also have a look at
http://www.vim.org/scripts/script.php?script_id=102
However its much slower to use.

So it depends on your use case.

Marc Weber

Steven Woody

unread,
Dec 8, 2008, 11:41:15 PM12/8/08
to vim...@googlegroups.com, Marc Weber, Vim

Hi, Everyone

Thanks for your inputs. DirDiff seems suitable to me. I can not
undersand the Japanese web page, but I think I can learn something at
http://www.vim.org/scripts/script.php?script_id=102

I will be trying it :)

Tony Mechelynck

unread,
Dec 9, 2008, 10:50:56 AM12/9/08
to Marc Weber, vim...@googlegroups.com, Vim
On 09/12/08 05:11, Marc Weber wrote:
> On Tue, Dec 09, 2008 at 11:03:03AM +0800, Steven Woody wrote:
>> I want to compare difference of two whole directory (with
>> subdirectories). Is vimdiff help in this case? I know, there is a
>> program winmrege on windows can do this task, but I am finding a
>> solution on Linux. Any suggest will be highly appreciated.
>
> diff -R foo/ bar/ | vim or such..

On my system, diff rejects -R as "invalid option". Looking into "man 1
diff" or "info diff" shows that it should have been either -r or
--recursive (but in lowercase).

You may want other options to define the diff format -- RTFM. Note that
AFAICT diff will not only list files present in only one directory tree,
but also compare the contents of files common to both. (I tried -ry
which wasn't very impressive, and -rC1 which was better.)

The first line of the output of "diff --version" is here

diff (GNU diffutils) 2.8.7-cvs

> also have a look at
> http://www.vim.org/scripts/script.php?script_id=102
> However its much slower to use.
>
> So it depends on your use case.
>
> Marc Weber

Best regards,
Tony.
--
"Nuclear war would mean abolition of most comforts, and disruption of
normal routines, for children and adults alike."
-- Willard F. Libby, "You *Can* Survive Atomic Attack"

Tony Mechelynck

unread,
Dec 9, 2008, 10:50:56 AM12/9/08
to Marc Weber, vim...@googlegroups.com, Vim
On 09/12/08 05:11, Marc Weber wrote:
> On Tue, Dec 09, 2008 at 11:03:03AM +0800, Steven Woody wrote:
>> I want to compare difference of two whole directory (with
>> subdirectories). Is vimdiff help in this case? I know, there is a
>> program winmrege on windows can do this task, but I am finding a
>> solution on Linux. Any suggest will be highly appreciated.
>
> diff -R foo/ bar/ | vim or such..

On my system, diff rejects -R as "invalid option". Looking into "man 1

diff" or "info diff" shows that it should have been either -r or
--recursive (but in lowercase).

You may want other options to define the diff format -- RTFM. Note that
AFAICT diff will not only list files present in only one directory tree,
but also compare the contents of files common to both. (I tried -ry
which wasn't very impressive, and -rC1 which was better.)

The first line of the output of "diff --version" is here

diff (GNU diffutils) 2.8.7-cvs

> also have a look at


> http://www.vim.org/scripts/script.php?script_id=102
> However its much slower to use.
>
> So it depends on your use case.
>
> Marc Weber

Best regards,

Reply all
Reply to author
Forward
0 new messages