Mercurial > hg-stable
changeset 3119:b1de36a4b4df
merge: simplify prompt code
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 17 Sep 2006 20:43:06 -0500 |
parents | 5644a05a608c |
children | 1c1e59aac82a |
files | mercurial/merge.py |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Sep 17 20:38:02 2006 -0500 +++ b/mercurial/merge.py Sun Sep 17 20:43:06 2006 -0500 @@ -142,10 +142,9 @@ del m2[f] elif f in ma: if n != ma[f] and not overwrite: - r = ui.prompt( + if ui.prompt( (_(" local changed %s which remote deleted\n") % f) + - _("(k)eep or (d)elete?"), _("[kd]"), _("k")) - if r == _("d"): + _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("d"): action.append((f, "r")) else: ui.debug(_("other deleted %s\n") % f) @@ -170,10 +169,9 @@ ui.debug(_("local deleted %s, recreating\n") % f) action.append((f, "g", m2.execf(f), n)) elif n != ma[f]: - r = ui.prompt( + if ui.prompt( (_("remote changed %s which local deleted\n") % f) + - _("(k)eep or (d)elete?"), _("[kd]"), _("k")) - if r == _("k"): + _("(k)eep or (d)elete?"), _("[kd]"), _("k")) == _("k"): action.append((f, "g", m2.execf(f), n)) else: ui.debug(_("local deleted %s\n") % f)