Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: tools/push-to-trunk/common_includes.py

Issue 685623004: Fix svn commit for deleted files in release scripts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 the V8 project authors. All rights reserved. 2 # Copyright 2013 the V8 project authors. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following 10 # copyright notice, this list of conditions and the following
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 def SVNCommit(self, root, commit_message): 729 def SVNCommit(self, root, commit_message):
730 patch = self.GitDiff("HEAD^", "HEAD") 730 patch = self.GitDiff("HEAD^", "HEAD")
731 TextToFile(patch, self._config["PATCH_FILE"]) 731 TextToFile(patch, self._config["PATCH_FILE"])
732 self.Command("svn", "update", cwd=self._options.svn) 732 self.Command("svn", "update", cwd=self._options.svn)
733 if self.Command("svn", "status", cwd=self._options.svn) != "": 733 if self.Command("svn", "status", cwd=self._options.svn) != "":
734 self.Die("SVN checkout not clean.") 734 self.Die("SVN checkout not clean.")
735 if not self.Command("patch", "-d %s -p1 -i %s" % 735 if not self.Command("patch", "-d %s -p1 -i %s" %
736 (root, self._config["PATCH_FILE"]), 736 (root, self._config["PATCH_FILE"]),
737 cwd=self._options.svn): 737 cwd=self._options.svn):
738 self.Die("Could not apply patch.") 738 self.Die("Could not apply patch.")
739 # Recursively add possibly newly added files. 739 for line in self.Command(
740 self.Command("svn", "add --force %s" % root, cwd=self._options.svn) 740 "svn", "status", cwd=self._options.svn).splitlines():
741 # Check for added and removed items. Svn status has seven status columns.
742 # The first contains ? for unknown and ! for missing.
743 match = re.match(r"^(.)...... (.*)$", line)
744 if match and match.group(1) == "?":
745 self.Command("svn", "add --force %s" % match.group(2),
746 cwd=self._options.svn)
747 if match and match.group(1) == "!":
748 self.Command("svn", "delete --force %s" % match.group(2),
749 cwd=self._options.svn)
750
741 self.Command( 751 self.Command(
742 "svn", 752 "svn",
743 "commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" % 753 "commit --non-interactive --username=%s --config-dir=%s -m \"%s\"" %
744 (self._options.author, self._options.svn_config, commit_message), 754 (self._options.author, self._options.svn_config, commit_message),
745 cwd=self._options.svn) 755 cwd=self._options.svn)
746 756
747 757
748 class BootstrapStep(Step): 758 class BootstrapStep(Step):
749 MESSAGE = "Bootstapping v8 checkout." 759 MESSAGE = "Bootstapping v8 checkout."
750 760
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 for (number, step_class) in enumerate([BootstrapStep] + step_classes): 942 for (number, step_class) in enumerate([BootstrapStep] + step_classes):
933 steps.append(MakeStep(step_class, number, self._state, self._config, 943 steps.append(MakeStep(step_class, number, self._state, self._config,
934 options, self._side_effect_handler)) 944 options, self._side_effect_handler))
935 for step in steps[options.step:]: 945 for step in steps[options.step:]:
936 if step.Run(): 946 if step.Run():
937 return 0 947 return 0
938 return 0 948 return 0
939 949
940 def Run(self, args=None): 950 def Run(self, args=None):
941 return self.RunSteps(self._Steps(), args) 951 return self.RunSteps(self._Steps(), args)
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698