[LNT] r266659 - Merge regressions in a more sane way
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 18 12:13:17 PDT 2016
Author: cmatthews
Date: Mon Apr 18 14:13:17 2016
New Revision: 266659
URL: http://llvm.org/viewvc/llvm-project?rev=266659&view=rev
Log:
Merge regressions in a more sane way
Since people use regression URLs, don't totally delete a regression,
just wipe it out with a manual redirect.
Also, when merging, be smart, pickup bugs and title from the most
interesting regression.
Modified:
lnt/trunk/lnt/server/ui/regression_views.py
Modified: lnt/trunk/lnt/server/ui/regression_views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/regression_views.py?rev=266659&r1=266658&r2=266659&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/regression_views.py (original)
+++ lnt/trunk/lnt/server/ui/regression_views.py Mon Apr 18 14:13:17 2016
@@ -177,10 +177,23 @@ def v4_regression_list():
.filter(ts.RegressionIndicator.regression_id.in_(
regressions_id_to_merge)) \
.all()
+ links = []
+ target = 0
+ for i, r in enumerate(regressions):
+ if r.bug:
+ target = i
+ links.append(r.bug)
+
new_regress = new_regression(ts, [x.field_change_id for x in reg_inds])
- new_regress.state = regressions[0].state
+ new_regress.state = regressions[target].state
+ new_regress.title = regressions[target].title
+ new_regress.bug = ' '.join(links)
+ for r in regressions:
+ r.bug = v4_url_for("v4_regression_detail", id=new_regress.id)
+ r.title = "Merged into Regression " + str(new_regress.id)
+ r.state = RegressionState.IGNORED
[ts.delete(x) for x in reg_inds]
- [ts.delete(x) for x in regressions]
+
ts.commit()
flash("Created" + new_regress.title, FLASH_SUCCESS)
return redirect(v4_url_for("v4_regression_detail", id=new_regress.id))
More information about the llvm-commits
mailing list