How to extract changes between labels or dates?

RajeshVaidheeswarranrv at fore.com RajeshVaidheeswarranrv at fore.com
Thu Apr 23 08:20:12 PDT 1998


Thanks for a very detailed answer. 

But I still think that this could be just a simple linear diff of (maxchg # at 
latest label) - (maxchg # at older label), and listing of changes between these
two changes (since that is already supported).

For example, this simple shell script does it for me now.

#!/bin/sh

if [ $# != 2 ]; then
   echo "Invalid usage"
   echo "Usage: $0 @label1 @label2"
   exit 1
fi

ochg=`p4 changes //depot/us/tag/4.2/...$1 | head -1 | awk '{print $2}'`

nchg=`p4 changes //depot/us/tag/4.2/...$2 | head -1 | awk '{print $2}'`

if [ $ochg -gt $nchg ]; then
   p4 changes //depot/us/tag/4.2/...@$nchg,@$ochg
else
  p4 changes //depot/us/tag/4.2/...@$ochg,@$nchg
fi


So, I am not sure why it might be difficult for perforce to support
this usage.

Just a thought.

rv

 -- using MH template repl.format --
In a previous message, Fredric.Fredriksson at mydata.se writes:

> 
> > p4 changes
> //depot/us/tag/4.2/... at L_tag52_official_release, at L_tag52_stable_windows_nt
> > Has anyone ever faced this before? I would think that something like the
> > above construct would be most useful to extract fixes, and prepare
> release
> > notes, etc.
> > Any thoughts?
> 
> my 0.02$:
> 
> I solved this with a perl script that lists changes for both
> labels and filter out the ones that differ.
> 
> When I played around with this I realised that unless the labels
> does not contain the exact same set of files you can not get a
> simple list of changes that "differ". What You get is three lists:
> 
> * changes common to both labels
> * changes in the first label
> * changes in the second label
> 
> And this is not the whole truth:
> Lets say I submit a change affecting files A and B. If A is included
> only in the first label and B in the second I get this change listed
> as affecting both labels. (In reality this is not a common problem,
> though)
> 
> My conclusion is: this is an extremely useful function I use it a lot
> _but_ there is more to it than what you see at a first glance.
> 
> 
> /Fredric Fredricson
> 
> 
> 





More information about the perforce-user mailing list