Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread John Baldwin
On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:
> Hello everyone,
>
> Because my mpsafetty project in Perforce is going quite well, I'm
> considering running some kind of cron job to generate nightly diffs, so
> other people (interested friends, colleagues and others) to test my
> work.
>
> I've read `p4 help diff2' and it seems you can run the following
> command:
>
>   p4 diff2 -b mpsafetty
>
> Unfortunately this command just does a braindead diff against the latest
> FreeBSD vendor source, which is not useful in my case. I just want it to
> generate a diff against the version I integrated.
>
> Is it possible to do this with Perforce?

One option is to create a label and sync it each time you do an integ.  I do 
this for projects/smpng.  Then I can do:

p4 diff2 -u -b smpng @smpng_base #head

Another option is to use a convention when you do integ's.  What I tend to do 
is when I do a 'p4 integ' I first do a 'p4 changes -m 10' in another window 
and include the last 'importer' submit in my submit message by having a 
message of:

'IFC @XX'

e.g.

'IFC @12345'

Then you can use p4 changes on your branch and find the last IFC and use that 
diff like so:

p4 diff2 -u -b mybranch @12345 #head

I have a script to look in p4 changes of the branch to find the last IFC 
commit and figure out the '12345' part automatically like so:

#!/bin/sh

b=$1
change=$(p4 changes -m 20 //depot/user/jhb/${b}/... | awk '/IFC @[1-9][0-9]*/ 
{ match($0, /@[1-9][0-9]*/); printf "%s\n", substr($0, RSTART, RLENGTH); exit 
0 }')

echo "Updating ~/work/patches/$b.patch"
p4 diff2 -u -b jhb_$b $change \#head > ~/work/patches/$b.patch

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread Mike Meyer
On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin <[EMAIL PROTECTED]> wrote:

> On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:
> > Hello everyone,
> >
> > Because my mpsafetty project in Perforce is going quite well, I'm
> > considering running some kind of cron job to generate nightly diffs, so
> > other people (interested friends, colleagues and others) to test my
> > work.
> >
> > I've read `p4 help diff2' and it seems you can run the following
> > command:
> >
> > p4 diff2 -b mpsafetty
> >
> > Unfortunately this command just does a braindead diff against the latest
> > FreeBSD vendor source, which is not useful in my case. I just want it to
> > generate a diff against the version I integrated.
> >
> > Is it possible to do this with Perforce?
> Then you can use p4 changes on your branch and find the last IFC and use that 
> diff like so:
> 
> p4 diff2 -u -b mybranch @12345 #head
> 
> I have a script to look in p4 changes of the branch to find the last IFC 
> commit and figure out the '12345' part automatically like so:


Perforce has facilities designed specifically to support this kind of
thing - counters and the "review" command. You can find a brief
description plus a link to the perforce-standard review daemon here:

http://www.perforce.com/perforce/loadsupp.html#daemon

It's designed to send email to perforce user.

Actually, something similar ought to be running on the repository
already. If so, and you're not using it, you can 'cheat' by setting up
the mail list you want and pointing your p4 user Email field at that,
along with the appropriate Reviews setting for yourself.

  http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread Julian Elischer

Mike Meyer wrote:

On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin <[EMAIL PROTECTED]> wrote:


On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:

Hello everyone,

Because my mpsafetty project in Perforce is going quite well, I'm
considering running some kind of cron job to generate nightly diffs, so
other people (interested friends, colleagues and others) to test my
work.

I've read `p4 help diff2' and it seems you can run the following
command:

p4 diff2 -b mpsafetty

Unfortunately this command just does a braindead diff against the latest
FreeBSD vendor source, which is not useful in my case. I just want it to
generate a diff against the version I integrated.

Is it possible to do this with Perforce?
Then you can use p4 changes on your branch and find the last IFC and use that 
diff like so:


p4 diff2 -u -b mybranch @12345 #head

I have a script to look in p4 changes of the branch to find the last IFC 
commit and figure out the '12345' part automatically like so:



Perforce has facilities designed specifically to support this kind of
thing - counters and the "review" command. You can find a brief
description plus a link to the perforce-standard review daemon here:

http://www.perforce.com/perforce/loadsupp.html#daemon

It's designed to send email to perforce user.

Actually, something similar ought to be running on the repository
already. If so, and you're not using it, you can 'cheat' by setting up
the mail list you want and pointing your p4 user Email field at that,
along with the appropriate Reviews setting for yourself.



I have two scripts that I modify and check into the base of each of my 
trees


look in //repos/user/julian/routing  for the files
update.sh and makediff.pl

they work together.

whenever I update my branch from the vendor (e.g. freebsd) branch,
I use the update script. it does everything needed and when it's
finished, it sets a lable on the vendor branch at the last palce from 
which I updated.. then the makediff.pl perl script generates a diff

from that point. This means that the diff doesn't include any
extraneous junk from later additions in the diff.
It also generates diffs that can be applied correctly by 'patch' which
perforce doesn't do by default.





___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread John Baldwin
On Monday 07 April 2008 12:43:00 pm Mike Meyer wrote:
> On Mon, 7 Apr 2008 10:39:07 -0400 John Baldwin <[EMAIL PROTECTED]> wrote:
> 
> > On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:
> > > Hello everyone,
> > >
> > > Because my mpsafetty project in Perforce is going quite well, I'm
> > > considering running some kind of cron job to generate nightly diffs, so
> > > other people (interested friends, colleagues and others) to test my
> > > work.
> > >
> > > I've read `p4 help diff2' and it seems you can run the following
> > > command:
> > >
> > >   p4 diff2 -b mpsafetty
> > >
> > > Unfortunately this command just does a braindead diff against the latest
> > > FreeBSD vendor source, which is not useful in my case. I just want it to
> > > generate a diff against the version I integrated.
> > >
> > > Is it possible to do this with Perforce?
> > Then you can use p4 changes on your branch and find the last IFC and use 
that 
> > diff like so:
> > 
> > p4 diff2 -u -b mybranch @12345 #head
> > 
> > I have a script to look in p4 changes of the branch to find the last IFC 
> > commit and figure out the '12345' part automatically like so:
> 
> 
> Perforce has facilities designed specifically to support this kind of
> thing - counters and the "review" command. You can find a brief
> description plus a link to the perforce-standard review daemon here:
> 
> http://www.perforce.com/perforce/loadsupp.html#daemon
> 
> It's designed to send email to perforce user.
> 
> Actually, something similar ought to be running on the repository
> already. If so, and you're not using it, you can 'cheat' by setting up
> the mail list you want and pointing your p4 user Email field at that,
> along with the appropriate Reviews setting for yourself.

This is not for e-mails for individual submits.  This for generating a 
cumulative patch of all the differences in one branch relative to the parent.

-- 
John Baldwin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread Ed Schouten
Thanks everyone for your replies. I think I should spend some time at
the office trying the solutions to see what's the easiest way.

I'm just a little bit disappointed by the fact that p4 doesn't have some
kind of switch for diff2 to do this by default. It should already keep a
list of such relations internally to make integrations and such work.

Is there a way for us to submit feature requests at Perforce?

-- 
 Ed Schouten <[EMAIL PROTECTED]>
 WWW: http://g-rave.nl/


pgpziq53R1fOg.pgp
Description: PGP signature


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread Ed Schouten
* John Baldwin <[EMAIL PROTECTED]> wrote:
> On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:
> > Hello everyone,
> >
> > Because my mpsafetty project in Perforce is going quite well, I'm
> > considering running some kind of cron job to generate nightly diffs, so
> > other people (interested friends, colleagues and others) to test my
> > work.
> >
> > I've read `p4 help diff2' and it seems you can run the following
> > command:
> >
> > p4 diff2 -b mpsafetty
> >
> > Unfortunately this command just does a braindead diff against the latest
> > FreeBSD vendor source, which is not useful in my case. I just want it to
> > generate a diff against the version I integrated.
> >
> > Is it possible to do this with Perforce?
> 
> One option is to create a label and sync it each time you do an integ.  I do 
> this for projects/smpng.  Then I can do:
> 
> p4 diff2 -u -b smpng @smpng_base #head

I just tried this and just wanted to say it works great. This method is
quite useful when you want to generate nightly patches and such. Thanks!

-- 
 Ed Schouten <[EMAIL PROTECTED]>
 WWW: http://g-rave.nl/


pgpNemW7BgyQo.pgp
Description: PGP signature


Re: Perforce and `p4 diff2' against the origin

2008-04-07 Thread Julian Elischer

Ed Schouten wrote:

* John Baldwin <[EMAIL PROTECTED]> wrote:

On Saturday 05 April 2008 10:50:38 am Ed Schouten wrote:

Hello everyone,

Because my mpsafetty project in Perforce is going quite well, I'm
considering running some kind of cron job to generate nightly diffs, so
other people (interested friends, colleagues and others) to test my
work.

I've read `p4 help diff2' and it seems you can run the following
command:

p4 diff2 -b mpsafetty

Unfortunately this command just does a braindead diff against the latest
FreeBSD vendor source, which is not useful in my case. I just want it to
generate a diff against the version I integrated.

Is it possible to do this with Perforce?
One option is to create a label and sync it each time you do an integ.  I do 
this for projects/smpng.  Then I can do:


p4 diff2 -u -b smpng @smpng_base #head


I just tried this and just wanted to say it works great. This method is


The two scripts I mentioned do exactly this. (but easier on the eyes.)







___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


FreeBSD Status Reports due: April 14th, 2008

2008-04-07 Thread Brad Davis
Hi Everyone,

It is that time again.  We would like to remind everybody who has exciting
news to share to write a report about their project.  This is a good way
to improve exposure of your work, receive feedback and help.  

Looking forward to your reports.  As always you can either use the
template or the CGI generator and mail the output to monthly@ by
Monday April 14th, 2008.

http://www.freebsd.org/news/status/
http://www.freebsd.org/cgi/monthly.cgi
http://www.freebsd.org/news/status/report-sample.xml


Regards,
Brad Davis
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"