OLD | NEW |
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 | 2 |
3 # Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. | 3 # Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved. |
4 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 4 # Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
5 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) | 5 # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) |
6 # | 6 # |
7 # Redistribution and use in source and binary forms, with or without | 7 # Redistribution and use in source and binary forms, with or without |
8 # modification, are permitted provided that the following conditions | 8 # modification, are permitted provided that the following conditions |
9 # are met: | 9 # are met: |
10 # | 10 # |
11 # 1. Redistributions of source code must retain the above copyright | 11 # 1. Redistributions of source code must retain the above copyright |
12 # notice, this list of conditions and the following disclaimer. | 12 # notice, this list of conditions and the following disclaimer. |
13 # 2. Redistributions in binary form must reproduce the above copyright | 13 # 2. Redistributions in binary form must reproduce the above copyright |
14 # notice, this list of conditions and the following disclaimer in the | 14 # notice, this list of conditions and the following disclaimer in the |
15 # documentation and/or other materials provided with the distribution. | 15 # documentation and/or other materials provided with the distribution. |
16 # 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of | 16 # 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
17 # its contributors may be used to endorse or promote products derived | 17 # its contributors may be used to endorse or promote products derived |
18 # from this software without specific prior written permission. | 18 # from this software without specific prior written permission. |
19 # | 19 # |
20 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 20 # THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
21 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 21 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
23 # DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 23 # DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
24 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 24 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
25 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 25 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 # Only print the last line. Subversion outputs all changed statuses bel
ow $dir | 460 # Only print the last line. Subversion outputs all changed statuses bel
ow $dir |
461 while (<SVN>) { | 461 while (<SVN>) { |
462 $svnOutput = $_; | 462 $svnOutput = $_; |
463 } | 463 } |
464 close SVN; | 464 close SVN; |
465 print $svnOutput if $svnOutput; | 465 print $svnOutput if $svnOutput; |
466 } elsif (isGit()) { | 466 } elsif (isGit()) { |
467 # Git removes a directory if it becomes empty when the last file it cont
ains is | 467 # Git removes a directory if it becomes empty when the last file it cont
ains is |
468 # removed by `git rm`. In svn-apply this can happen when a directory is
being | 468 # removed by `git rm`. In svn-apply this can happen when a directory is
being |
469 # removed in a patch, and all of the files inside of the directory are r
emoved | 469 # removed in a patch, and all of the files inside of the directory are r
emoved |
470 # before attemping to remove the directory itself. In this case, Git wil
l have | 470 # before attemping to remove the directory itself. In this case, Git wil
l have |
471 # already deleted the directory and `git rm` would exit with an error cl
aiming | 471 # already deleted the directory and `git rm` would exit with an error cl
aiming |
472 # there was no file. The --ignore-unmatch switch gracefully handles this
case. | 472 # there was no file. The --ignore-unmatch switch gracefully handles this
case. |
473 system("git", "rm", "--force", "--ignore-unmatch", $path) == 0 or die "F
ailed to git rm --force --ignore-unmatch $path."; | 473 system("git", "rm", "--force", "--ignore-unmatch", $path) == 0 or die "F
ailed to git rm --force --ignore-unmatch $path."; |
474 } | 474 } |
475 } | 475 } |
OLD | NEW |