[yt-svn] commit/yt: chummels: Merged in ngoldbaum/yt (pull request #1860)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 16 11:31:02 PST 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/50f82a593a98/
Changeset: 50f82a593a98
Branch: yt
User: chummels
Date: 2015-11-16 19:30:52+00:00
Summary: Merged in ngoldbaum/yt (pull request #1860)
Fix breakage in the pr_backport.py script if there is no experimental bookmark
Affected #: 1 file
diff -r cba5e95e12bdd42c2a6f1b7f540ea524d73785be -r 50f82a593a983ca8ee997a0650fc03eddfdbb30b scripts/pr_backport.py
--- a/scripts/pr_backport.py
+++ b/scripts/pr_backport.py
@@ -23,7 +23,12 @@
with hglib.open(dest_repo_path) as client:
# Changesets that are on the yt branch but aren't topological ancestors
# of whichever changeset the experimental bookmark is pointing at
- client.update('heads(branch(yt) - ::bookmark(experimental))')
+ bookmarks, _ = client.bookmarks()
+ bookmark_names = [b[0] for b in bookmarks]
+ if 'experimental' in bookmark_names:
+ client.update('heads(branch(yt) - ::bookmark(experimental))')
+ else:
+ client.update('heads(branch(yt))')
return dest_repo_path
@@ -51,9 +56,13 @@
def get_branch_tip(repo_path, branch, exclude=None):
"""Returns the SHA1 hash of the most recent commit on the given branch"""
revset = "head() and branch(%s)" % branch
- if exclude is not None:
- revset += "and not %s" % exclude
with hglib.open(repo_path) as client:
+ if exclude is not None:
+ try:
+ client.log(exclude)
+ revset += "and not %s" % exclude
+ except hglib.error.CommandError:
+ pass
change = client.log(revset)[0][1][:12]
return change
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list