usr/src/tools/onbld/Scm/WorkSpace.py
changeset 7298 b69e27387f74
parent 7078 935563142864
child 9006 c03e0483bda8
equal deleted inserted replaced
7297:e4b614b9dc04 7298:b69e27387f74
    14 #
    14 #
    15 
    15 
    16 #
    16 #
    17 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
    17 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
    18 # Use is subject to license terms.
    18 # Use is subject to license terms.
    19 #
       
    20 # ident	"%Z%%M%	%I%	%E% SMI"
       
    21 #
    19 #
    22 
    20 
    23 #
    21 #
    24 # Theory:
    22 # Theory:
    25 #
    23 #
   636                          ctxs)
   634                          ctxs)
   637 
   635 
   638         self.activecache[parent] = act
   636         self.activecache[parent] = act
   639         return act
   637         return act
   640 
   638 
   641     def pdiff(self, parent=None):
   639     def pdiff(self, pats, opts, parent=None):
   642         'Return diffs relative to PARENT, as best as we can make out'
   640         'Return diffs relative to PARENT, as best as we can make out'
   643 
   641 
   644         parent = self.parent(parent)
   642         parent = self.parent(parent)
   645         act = self.active(parent)
   643         act = self.active(parent)
   646 
   644 
   649         # changes.
   647         # changes.
   650         #
   648         #
   651         if not act.revs:
   649         if not act.revs:
   652             return
   650             return
   653 
   651 
       
   652         names, match = cmdutil.matchpats(self.repo, pats, opts)[:2]
       
   653         opts = patch.diffopts(self.ui, opts)
       
   654 
   654         ret = cStringIO.StringIO()
   655         ret = cStringIO.StringIO()
   655         patch.diff(self.repo, act.parenttip.node(), act.localtip.node(),
   656         patch.diff(self.repo, act.parenttip.node(), act.localtip.node(),
   656                    fp=ret)
   657                    names, fp=ret, opts=opts, match=match)
   657         return ret.getvalue()
   658         return ret.getvalue()
   658 
   659 
   659     #
   660     #
   660     # Theory:
   661     # Theory:
   661     #
   662     #