Changes between Version 85 and Version 86 of UsingGitWithWebKit


Ignore:
Timestamp:
Jun 17, 2012, 10:34:13 PM (12 years ago)
Author:
yosin@chromium.org
Comment:

Add "Copying file aka svn copy" section

Legend:

Unmodified
Added
Removed
Modified
  • UsingGitWithWebKit

    v85 v86  
    343343webkit-patch mark-bug-fixed 12347
    344344}}}
     345== Copying file aka {{{svn copy}}} ==
     346The Git does automatic tracking of copied files like what "svn copy" does.
     347Although, on default, git checks modified source file and new file.
     348There are options which we should tell git to check unmodified source files, -C and --find-copies-harder.
     349
     350Here is sample workflow how to use -C and --find-copies-harder with "git svn dcommit":
     351 * Copy files
     352 * Update ChangeLog
     353 * {{{git commit}}} and put contents of ChangeLog into git commit log. It will be svn commit message
     354 * {{{git svn dcommit -n -C50 --find-copies-harder}}} Dry run
     355   Output may be
     356   {{{
     357Committing to http://svn.webkit.org/repository/webkit/trunk...
     358diff-tree b6f4e217870317390ebcd2f4fe7410b8b5220b96~1 b6f4e217870317390ebcd2f4fe7410b8b5220b96
     359   }}}
     360 * {{{git diff-tree p -C50 --find-copies-harder b6f4e217870317390ebcd2f4fe7410b8b5220b96~1 b6f4e217870317390ebcd2f4fe7410b8b5220b96}}}
     361   * Output should be "copy from" and "copy to"
     362 * {{{git svn dcommit -C50 --find-copies-harder}}}
     363   Output should be looks like:
     364   {{{
     365Committing to http://svn.webkit.org/repository/webkit/trunk...
     366        C Source/WebCore/Foo.cpp
     367        C Source/WebCore/ChangeLog
     368Committed r123456
     369        M Source/WebCore/ChangeLog
     370}}}
     371
     372See also [https://bugs.webkit.org/show_bug.cgi?id=89155 WK-89155](failure example) and [http://trac.webkit.org/changeset/120567 r120567] (successful example)