Patchwork [1,of,9] pull: for pull --update with failed update, print hint if any

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 24, 2013, 4:50 a.m.
Message ID <8c6dfa8dcc7a0afc32da.1379998258@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/2613/
State Accepted
Commit a9abdb168425276439d8eaa16cf8b1f85dd37760
Headers show

Comments

Siddharth Agarwal - Sept. 24, 2013, 4:50 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1379988152 25200
#      Mon Sep 23 19:02:32 2013 -0700
# Node ID 8c6dfa8dcc7a0afc32dad974efcd0070b05e4379
# Parent  8a380fb61a35d5d0528adeb3716ec7d3b4f920a7
pull: for pull --update with failed update, print hint if any

An upcoming patch will add a hint to the abort message, and we don't want to
lose that here.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4527,6 +4527,8 @@ 
             ret = hg.update(repo, checkout)
         except util.Abort, inst:
             ui.warn(_("not updating: %s\n") % str(inst))
+            if inst.hint:
+                ui.warn(_("(%s)\n") % inst.hint)
             return 0
         if not ret and not checkout:
             if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):