Monday, May 12, 2014

svn merge trunk to branch command line


1. Find last revision merged from trunk to branch.

      svn log -v --stop-on-copy

2. Checkout the branch into a directory.

      mkdir branch_dir
      cd branch_dir
      svn co branch_url


3. Merge trunk into branch.


      svn merge -rBranchCreatedTrunk:HEAD trunk_url branch_dir
              BranchCreatedTrunk (from Step 1)

         Use appropriate merge options:-
        (e)  edit             - change merged file in an editor
        (df) diff-full        - show all changes made to merged file
        (r)  resolved         - accept merged version of file
        (dc) display-conflict - show all conflicts (ignoring merged version)
        (mc) mine-conflict    - accept my version for all conflicts (same)
        (tc) theirs-conflict  - accept their version for all conflicts (same)
        (mf) mine-full        - accept my version of entire file
        (tf) theirs-full      - accept their version of entire file (same)
        (p)  postpone         - mark the conflict to be resolved later
        (l)  launch           - launch external tool to resolve conflict
        (s)  show all         - show this list





Friday, May 2, 2014

Edit files in place using perl.

Edit files in place using perl.


perl -p -i -e 's/>10</>15</g' ca-service.xml gw-service.xml ga-service.xml