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

Unified Diff: git_find_releases.py

Issue 1325233005: find-releases: handle untagged merges (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_find_releases.py
diff --git a/git_find_releases.py b/git_find_releases.py
index 4bb27c54d814e0b2bb9f1d9938ca58c12367bf9d..ef65c0e6d7a5380aa457681d245937a293a56adf 100755
--- a/git_find_releases.py
+++ b/git_find_releases.py
@@ -19,7 +19,12 @@ import git_common as git
def GetNameForCommit(sha1):
- return re.sub(r'~.*$', '', git.run('name-rev', '--tags', '--name-only', sha1))
+ name = re.sub(r'~.*$', '', git.run('name-rev', '--tags', '--name-only', sha1))
+ if name == 'undefined':
+ name = git.run(
+ 'name-rev', '--refs', 'remotes/branch-heads/*', '--name-only',
+ sha1) + ' [untagged]'
+ return name
def GetMergesForCommit(sha1):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698