Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

12. Managing Changes with Mercurial Queu... > Third-Party Tools for Working with P...

Third-Party Tools for Working with Patches

Once you’ve been working with patches for a while, you’ll find yourself hungry for tools that will help you to understand and manipulate the patches you’re dealing with.

The diffstat command generates a histogram of the modifications made to each file in a patch. It provides a good way to get a sense of a patch—which files it affects, and how much change it introduces to each file and as a whole. (I find that it’s a good idea to use diffstat’s -p option as a matter of course, as otherwise it will try to do clever things with prefixes of filenames that inevitably confuse at least me.)

$ diffstat -p1 remove-redundant-null-checks.patch
 drivers/char/agp/sgi-agp.c        |    5 ++---
 drivers/char/hvcs.c               |   11 +++++------
 drivers/message/fusion/mptfc.c    |    6 ++----
 drivers/message/fusion/mptsas.c   |    3 +--
 drivers/net/fs_enet/fs_enet-mii.c |    3 +--
 drivers/net/wireless/ipw2200.c    |   22 ++++++----------------
 drivers/scsi/libata-scsi.c        |    4 +---
 drivers/video/au1100fb.c          |    3 +--
 8 files changed, 19 insertions(+), 38 deletions(-)

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint