Index: tools/push-to-trunk/common_includes.py |
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py |
index 6368a279f2309dc5ee2409cf0764fe3c5c6de8df..efea54a0998a71986a1be5c334fbcafde20820e8 100644 |
--- a/tools/push-to-trunk/common_includes.py |
+++ b/tools/push-to-trunk/common_includes.py |
@@ -442,8 +442,12 @@ class Step(GitRecipesMixin): |
except GitFailedException: |
self.WaitForResolvingConflicts(patch_file) |
- def FindLastTrunkPush(self, parent_hash=""): |
- push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based" |
+ def FindLastTrunkPush(self, parent_hash="", include_patches=False): |
+ push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*" |
+ if not include_patches: |
+ # Non-patched versions only have three numbers followed by the "(based |
+ # on...) comment." |
+ push_pattern += " (based" |
branch = "" if parent_hash else "svn/trunk" |
return self.GitLog(n=1, format="%H", grep=push_pattern, |
parent_hash=parent_hash, branch=branch) |