Discussion:
[p4] Perforce Blame script?
Masson, Matt
2001-05-17 17:45:20 UTC
Permalink
Hi,

Before I create my own, I was wondering if anyone has made/seen something
equivalent to the cvsblame script, which shows exactly who created which
portion of a file using the revision history in CVS.

Any info would be appreciated.

~Matt
Gareth Rees
2001-05-17 18:23:51 UTC
Permalink
Post by Masson, Matt
Before I create my own, I was wondering if anyone has made/seen something
equivalent to the cvsblame script, which shows exactly who created which
portion of a file using the revision history in CVS.
I know of two tools that do something similar to what you ask. They
annotate each line of a file with the changelist that most recently
affected the line. You should be able to adapt them to do what you
want.

First, the p4pr Perl script by Bob Sidebotham
<ftp://ftp.perforce.com/pub/perforce/contrib/misc/p4pr.perl>. (This
can't cope with deleted revisions; I can supply a patch if you need
that functionality.)

Second, the Emacs Perforce interface <http://www.dsmit.com/p4/> has a
command 'p4-print-with-rev-history' (bound to `C-x p V').
Simon Morton
2001-05-17 18:33:46 UTC
Permalink
Try p4pr.perl, on the perforce downloads page. Works a treat, although
it gets slower the more revisions that the file has.

Simon
-----Original Message-----
Sent: Thursday, May 17, 2001 1:45 PM
Subject: [p4] Perforce Blame script?
Hi,
Before I create my own, I was wondering if anyone has
made/seen something
equivalent to the cvsblame script, which shows exactly who
created which
portion of a file using the revision history in CVS.
Any info would be appreciated.
~Matt
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Chris Patti
2001-05-17 18:36:15 UTC
Permalink
Post by Masson, Matt
Hi,
Before I create my own, I was wondering if anyone has made/seen something
equivalent to the cvsblame script, which shows exactly who created which
portion of a file using the revision history in CVS.
Any info would be appreciated.
~Matt
You should at least look at http://public.perforce.com/perforce/loadsupp.html

Check out p4pr.pl it's like "cvs annotate" which I think is the basis for
blame.

-Chris
Mike Castle
2001-05-17 18:42:12 UTC
Permalink
Post by Masson, Matt
Hi,
Before I create my own, I was wondering if anyone has made/seen something
equivalent to the cvsblame script, which shows exactly who created which
portion of a file using the revision history in CVS.
I've never seen/heard of "cvsblame." How does it differ from the output
of "cvs annotate" (which would look something like:

1.1 (nexus 15-Apr-01): #!/bin/sh
1.8 (nexus 17-May-01): # $Id: sbuild,v 1.7 2001/05/17 17:44:12
nexus
Exp $
1.3 (nexus 16-May-01):
1.3 (nexus 16-May-01): error()
1.3 (nexus 16-May-01): {
1.3 (nexus 16-May-01): echo "ERROR:" "$@" 1>&2
1.3 (nexus 16-May-01): }


If I could get something like this out of perforce, I'd like that.

mrc
Masson, Matt
2001-05-17 19:22:20 UTC
Permalink
What I had in mind was something like this (from Mozilla.org's Bonsai
project):

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/webtools/bonsai/cvsblame
.pl

The p4pr.perl is as a great starting point for this. Thank you to everyone
who replied... I guess this is a frequently used script!


-----Original Message-----
From: Mike Castle [mailto:***@yy.com]
Sent: Thursday, May 17, 2001 2:42 PM
To: 'perforce-***@perforce.com'
Subject: Re: [p4] Perforce Blame script?
Post by Masson, Matt
Hi,
Before I create my own, I was wondering if anyone has made/seen something
equivalent to the cvsblame script, which shows exactly who created which
portion of a file using the revision history in CVS.
I've never seen/heard of "cvsblame." How does it differ from the output
of "cvs annotate" (which would look something like:

1.1 (nexus 15-Apr-01): #!/bin/sh
1.8 (nexus 17-May-01): # $Id: sbuild,v 1.7 2001/05/17 17:44:12
nexus
Exp $
1.3 (nexus 16-May-01):
1.3 (nexus 16-May-01): error()
1.3 (nexus 16-May-01): {
1.3 (nexus 16-May-01): echo "ERROR:" "$@" 1>&2
1.3 (nexus 16-May-01): }


If I could get something like this out of perforce, I'd like that.

mrc
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
Stephen Vance
2001-05-22 05:11:11 UTC
Permalink
The key here is that it is *logically* the same file, but not
entirely. Perforce doesn't understand that it should consider diff'ing
against the branched predecessor. This is a bit of a corner case that only
comes up when you modify while branching. It would make an excellent
enhancement request, IMHO.

Your best bet is to use 'p4 diff2' on the proper versions, using filelog to
identify the proper one.

Steve
Post by Tal Dayan
When I rename a file using the Integrate/Delete commands and then
modifying it, it is not included anymore in diff's against the depot (p4
diff)
even though logically it is the same file.
Is there a simple way to include renamed files in the diff (e.g. an
'i' switch similar to the 'filelog' command) ?
Thanks,
Tal
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
Stephen Vance
mailto:***@vance.com
http://www.vance.com/

Paul C. Pharr
2001-05-17 22:05:13 UTC
Permalink
I know there aren't a great number of Mac users out there, but I've got an intermittent
Mac problem which is driving me nuts & I'd like to know if there is anyone who has seen
this or knows what is happening.

On some of our machines, but not all, files opened from the CodeWarrior plug-in don't
appear in the P4Web default changelist. They are listed in the path browser as opened by
the current user, but when a submit is attempted, they are not listed in the submit form.
The client is set to the same thing in P4Web and CodeWarrior VCS setup.

If I select the same client on a different machine in P4Web - either on Mac or Windows, I
see none of the files as submission candidates.

Does anyone know what P4Web might be looking at to determine that a file which is opened
for edit by the current user on the current client is not a candidate for submission? I
can't be sure this is a P4Web problem, but it sure looks like it. The frustrating fact is
that other machines work without any problems at all, but I have at least three which
exhibit this problem. Has anyone else seen it?

I have some engineers who are submitting every file in an independent change list to get
around this problem, making our whole system harder to use. I don't want to tell them that
they can't open files directly from the IDE. I've got to find a workaround! I submitted
this bug to Perforce a couple of months ago, but I don't think they have been able to
reproduce it - so I'm not expecting a fix until I can show them what's going on.


Thanks!

Paul C. Pharr
CAD Software Manager
Nemetschek North America
Tal Dayan
2001-05-22 03:02:23 UTC
Permalink
When I rename a file using the Integrate/Delete commands and then
modifying it, it is not included anymore in diff's against the depot (p4
diff)
even though logically it is the same file.

Is there a simple way to include renamed files in the diff (e.g. an
'i' switch similar to the 'filelog' command) ?

Thanks,

Tal
Loading...