Perforce tip: How to apply my default change to the release Branch

Source: Internet
Author: User
Tags perforce

Create the patch,

P4 diff-du-DB main-branch/...> ~ /Mywork. Patch

Go to the work directory of release branch.

CD Dir-release-branch/

'P4 edit' the files I want to patch under release branch. Please note,

  • 'Lsdiff' is from the package 'pattern '.
  • 'Nosl 'will strip the slashes. It's written by me.
Cat ~ /Mywork. Patch | lsdiff | nosl 5 | P4-X-Edit

Patch the files and done!

Patch-P5 <~ /Mywork. Patch

Here is the source code of nosl. I put it in my. bashrc

Function nosl () {if [-z "$1"]; then Echo "Usage: echo/Hello/World | nosl num "Echo" Strip num leading slashes "else Perl-pe"/$ n = $1; while (/$ n> 0) {/$ _ = ~ S/[^/] * // + //;/$ n --;} "fi}

BTW, you cocould save all the trouble of perforce
By switching to git
.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.