[p4] Find old dead code?
Qazwart
qazwart at gmail.com
Mon Oct 29 21:45:33 PDT 2007
Wonder if the p4 annotate command can do something for you in this
regard. It shows you the changeset when the line was last edited in
Perforce. You can search the changesets to find the earliest one you
want to keep, and grep out if the changeset is earlier than that one.
On Oct 29, 2007, at 11:08 PM, Roy Smith wrote:
> I want to clean out some old dead code, i.e. blocks which are
> surrounded by
>
> #if 0
> [...]
> #endif
>
> Finding all the #if 0 lines is easy with grep. What's a bit more
> complicated is finding all the *old* ones. Say, older than a year
> (i.e. I'll put up with such sillyness, as long as it's recent; humor
> me on that for the moment). Perforce certainly has the information
> needed to perform that query, but is there any reasonable way to
> script doing this?
>
> if "p4 annotate" could tag lines with dates instead of change or
> version numbers, that would get me most of the way there, but it
> doesn't seem to be able to do that.
>
> -------------------
> Roy Smith <smith_roy at emc.com>
> Software Guy, EMC Common Management Group
> 44 South Broadway, 7th floor
> White Plains, NY 10601
> (914) 580-3427
> AIM: roysmith649
>
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
David Weintraub
david at weintraub.name
qazwart at gmail.com
More information about the perforce-user
mailing list