Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Multi-file diff tool
Home

[Freeciv-Dev] Multi-file diff tool

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Multi-file diff tool
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 21 Feb 2003 16:18:13 +0100

A shortcoming of cvs diff is that you can't get a diff for all files
of a given "cvs commit" command. I.e. all which have the same commit
message. You can do this with get_diff.

Usage:
 $ get_diff -r common/hash.c:1.2

This will show information about the commit which is related to the
creation of the revision 1.2 of common/hash.c. The output is:
------------ start --------------
Fri Mar 31 06:52:30 2000-Fri Mar 31 06:52:30 2000  dwp:

  common/hash.c:1.2
  common/hash.h:1.2

        Extends the functionality of common/hash.c, to remove the
        previous main limitations: individual elements can now be
        deleted, and the hash table dynamically resizes as new elements
        are added.

 hash.c |  175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 hash.h |    3 +
 2 files changed, 154 insertions(+), 24 deletions(-)

wc:  330 1235 10201

Index: common/hash.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/hash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- common/hash.c       2000/03/21 11:33:52     1.1
+++ common/hash.c       2000/03/31 06:52:30     1.2
@@ -41,22 +41,27 @@
    use of the ordering information if the return value is non-zero).
 
    Implementation uses closed hashing with simple collision resolution.

.
.
.

Index: common/hash.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/hash.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- common/hash.h       2000/03/21 11:33:53     1.1
+++ common/hash.h       2000/03/31 06:52:30     1.2
@@ -42,7 +42,10 @@
 int hash_key_exists(const struct hash_table *h, const void *key);
 void *hash_lookup_data(const struct hash_table *h, const void *key);
 
+void *hash_delete_entry(struct hash_table *h, const void *key);
+
 unsigned int hash_num_entries(const struct hash_table *h);
 unsigned int hash_num_buckets(const struct hash_table *h);
+unsigned int hash_num_deleted(const struct hash_table *h);
 
 #endif  /* FC__HASH_H */
------------ end --------------

There is another way to specify the commit: by date. Currently only
one date format is recognized: the one from cvs. So if you want to
know what has changed in the recent commit to the SDL client and what
the commit message

  This make bigger Mess that before.
  Sorry SDLClient still not work :(

really means you will have to type

 $ get_diff -d "2003/02/21 03:40:06"

and look at the diff you get.

You need at least Python 2.0. I have only tested it with Python
2.2. The initial cvs log takes some time. It doesn't support
branches. You may want to change the parameters at the top of
get_diff.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.

Attachment: get_diff
Description: Text document

Attachment: get_diff_helper.py
Description: Text document


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