[p4] Maintaining vendor branches
Robert Cowham
robert at vaccaperna.co.uk
Wed Dec 29 01:42:45 PST 2004
Looks good.
The flush is required so that Perforce thinks that you have the latest
copies of all the files. Thus when you do a diff -se it will detect changed
files (ones not open for edit with different contents). An alternative is to
sync the files and then "rm -rf", but the flush is faster because it doesn't
transfer contents over just updates the "have" list to what a sync would
have done (i.e. head rev in this case).
As for tools, you could script the below easily in Ruby with p4ruby (or
Perl/p4perl if you insist)...
Robert
> In particular, I
> believe it will be fairly frequent that files are moved *and*
> edited at the same time.
>
> I think the following process may work (assume a dedicated p4
> client for this vendor branch):
>
> cvs update
> p4 flush
> p4 diff -sd | p4 -x- delete
> p4 diff -se | p4 -x- edit
> find . -type f | p4 -x- add
> ... for each 'add' that should be converted to 'integrate':
> p4 revert <oldname>
> p4 integrate <newname> <oldname>
> p4 submit
>
> cvs update
> p4 flush
> p4 diff -se | p4 -x- edit
> p4 submit
>
> Does that sound reasonable? Does anybody have tools or tips
> that might make this process easier?
>
> (I'm also not quite clear about why the 'p4 flush' is necessary...)
More information about the perforce-user
mailing list