OLD | NEW |
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 def GetBranches(self): | 271 def GetBranches(self): |
272 raise NotImplementedError() | 272 raise NotImplementedError() |
273 | 273 |
274 def GitSvn(self, hsh, branch=""): | 274 def GitSvn(self, hsh, branch=""): |
275 raise NotImplementedError() | 275 raise NotImplementedError() |
276 | 276 |
277 def SvnGit(self, rev, branch=""): | 277 def SvnGit(self, rev, branch=""): |
278 raise NotImplementedError() | 278 raise NotImplementedError() |
279 | 279 |
| 280 def MasterBranch(self): |
| 281 raise NotImplementedError() |
| 282 |
| 283 def CandidateBranch(self): |
| 284 raise NotImplementedError() |
| 285 |
280 def RemoteMasterBranch(self): | 286 def RemoteMasterBranch(self): |
281 raise NotImplementedError() | 287 raise NotImplementedError() |
282 | 288 |
283 def RemoteCandidateBranch(self): | 289 def RemoteCandidateBranch(self): |
284 raise NotImplementedError() | 290 raise NotImplementedError() |
285 | 291 |
286 def RemoteBranch(self, name): | 292 def RemoteBranch(self, name): |
287 raise NotImplementedError() | 293 raise NotImplementedError() |
288 | 294 |
289 def Land(self): | 295 def Land(self): |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 self.step.GitRemotes()) | 330 self.step.GitRemotes()) |
325 # Remove 'svn/' prefix. | 331 # Remove 'svn/' prefix. |
326 return map(lambda s: s[4:], branches) | 332 return map(lambda s: s[4:], branches) |
327 | 333 |
328 def GitSvn(self, hsh, branch=""): | 334 def GitSvn(self, hsh, branch=""): |
329 return self.step.GitSVNFindSVNRev(hsh, branch) | 335 return self.step.GitSVNFindSVNRev(hsh, branch) |
330 | 336 |
331 def SvnGit(self, rev, branch=""): | 337 def SvnGit(self, rev, branch=""): |
332 return self.step.GitSVNFindGitHash(rev, branch) | 338 return self.step.GitSVNFindGitHash(rev, branch) |
333 | 339 |
| 340 def MasterBranch(self): |
| 341 return "bleeding_edge" |
| 342 |
| 343 def CandidateBranch(self): |
| 344 return "trunk" |
| 345 |
334 def RemoteMasterBranch(self): | 346 def RemoteMasterBranch(self): |
335 return "svn/bleeding_edge" | 347 return "svn/bleeding_edge" |
336 | 348 |
337 def RemoteCandidateBranch(self): | 349 def RemoteCandidateBranch(self): |
338 return "svn/trunk" | 350 return "svn/trunk" |
339 | 351 |
340 def RemoteBranch(self, name): | 352 def RemoteBranch(self, name): |
341 return "svn/%s" % name | 353 return "svn/%s" % name |
342 | 354 |
343 def Land(self): | 355 def Land(self): |
(...skipping 19 matching lines...) Expand all Loading... |
363 return self.step.Git("tag").strip().splitlines() | 375 return self.step.Git("tag").strip().splitlines() |
364 | 376 |
365 def GetBranches(self): | 377 def GetBranches(self): |
366 # Get relevant remote branches, e.g. "origin/branch-heads/3.25". | 378 # Get relevant remote branches, e.g. "origin/branch-heads/3.25". |
367 branches = filter( | 379 branches = filter( |
368 lambda s: re.match(r"^origin/branch\-heads/\d+\.\d+$", s), | 380 lambda s: re.match(r"^origin/branch\-heads/\d+\.\d+$", s), |
369 self.step.GitRemotes()) | 381 self.step.GitRemotes()) |
370 # Remove 'origin/branch-heads/' prefix. | 382 # Remove 'origin/branch-heads/' prefix. |
371 return map(lambda s: s[20:], branches) | 383 return map(lambda s: s[20:], branches) |
372 | 384 |
| 385 def MasterBranch(self): |
| 386 return "master" |
| 387 |
| 388 def CandidateBranch(self): |
| 389 return "candidates" |
| 390 |
373 def RemoteMasterBranch(self): | 391 def RemoteMasterBranch(self): |
374 return "origin/master" | 392 return "origin/master" |
375 | 393 |
376 def RemoteCandidateBranch(self): | 394 def RemoteCandidateBranch(self): |
377 return "origin/candidates" | 395 return "origin/candidates" |
378 | 396 |
379 def RemoteBranch(self, name): | 397 def RemoteBranch(self, name): |
380 if name in ["candidates", "master"]: | 398 if name in ["candidates", "master"]: |
381 return "origin/%s" % name | 399 return "origin/%s" % name |
382 return "origin/branch-heads/%s" % name | 400 return "origin/branch-heads/%s" % name |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 for (number, step_class) in enumerate(step_classes): | 880 for (number, step_class) in enumerate(step_classes): |
863 steps.append(MakeStep(step_class, number, self._state, self._config, | 881 steps.append(MakeStep(step_class, number, self._state, self._config, |
864 options, self._side_effect_handler)) | 882 options, self._side_effect_handler)) |
865 for step in steps[options.step:]: | 883 for step in steps[options.step:]: |
866 if step.Run(): | 884 if step.Run(): |
867 return 0 | 885 return 0 |
868 return 0 | 886 return 0 |
869 | 887 |
870 def Run(self, args=None): | 888 def Run(self, args=None): |
871 return self.RunSteps(self._Steps(), args) | 889 return self.RunSteps(self._Steps(), args) |
OLD | NEW |