Browse Source

Merge "Suggest a 'cherry-picked from' line when cherry picking"

changes/79/809279/1
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
d084c102f9
  1. 10
      gertty/view/change.py

10
gertty/view/change.py

@ -97,6 +97,14 @@ class EditHashtagsDialog(mywid.ButtonDialog):
class CherryPickDialog(urwid.WidgetWrap, mywid.LineBoxTitlePropertyMixin):
signals = ['save', 'cancel']
def _cherry_pick_message(self, change):
revision = change.revisions[-1]
return "{}\n(cherry picked from commit {})".format(
revision.message.rstrip('\n'),
revision.commit,
)
def __init__(self, app, change):
save_button = mywid.FixedButton('Propose Change')
cancel_button = mywid.FixedButton('Cancel')
@ -108,7 +116,7 @@ class CherryPickDialog(urwid.WidgetWrap, mywid.LineBoxTitlePropertyMixin):
('pack', cancel_button)]
button_columns = urwid.Columns(button_widgets, dividechars=2)
rows = []
self.entry = mywid.MyEdit(edit_text=change.revisions[-1].message,
self.entry = mywid.MyEdit(edit_text=self._cherry_pick_message(change),
multiline=True, ring=app.ring)
self.branch_buttons = []
rows.append(urwid.Text(u"Branch:"))

Loading…
Cancel
Save