Patchwork [2,of,2,re] discovery: make "note: unsynced remote changes!" less serious than a warning

login
register
mail settings
Submitter Mads Kiilerich
Date Feb. 7, 2014, 4:25 p.m.
Message ID <b0540dc31d24a7a53939.1391790309@mk-desktop>
Download mbox | patch
Permalink /patch/3511/
State Accepted
Commit 7648e9aef6eeab00a0946e877690e94fb12d389b
Headers show

Comments

Mads Kiilerich - Feb. 7, 2014, 4:25 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1391790252 -3600
#      Fri Feb 07 17:24:12 2014 +0100
# Node ID b0540dc31d24a7a53939586ee818be32f694466f
# Parent  c024b6d06d945181f595888b6b731ce43bf03793
discovery: make "note: unsynced remote changes!" less serious than a warning

This situation is not necessarily a problem and do not deserve a warning. It is
just some information that can guide the user in understanding what is going
on.

Making it 'debug' would usually not give the hint when it is relevant so we
make it a 'status' message.
Matt Mackall - Feb. 13, 2014, 11:48 p.m.
On Fri, 2014-02-07 at 17:25 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1391790252 -3600
> #      Fri Feb 07 17:24:12 2014 +0100
> # Node ID b0540dc31d24a7a53939586ee818be32f694466f
> # Parent  c024b6d06d945181f595888b6b731ce43bf03793
> discovery: make "note: unsynced remote changes!" less serious than a warning

Queued for default, thanks.

Patch

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -315,11 +315,11 @@ 
         if unsynced:
             heads = ' '.join(short(h) for h in unsynced)
             if branch is None:
-                repo.ui.warn(_("remote has heads that are "
-                               "not known locally: %s\n") % heads)
+                repo.ui.status(_("remote has heads that are "
+                                 "not known locally: %s\n") % heads)
             else:
-                repo.ui.warn(_("remote has heads on branch '%s' that are "
-                               "not known locally: %s\n") % (branch, heads))
+                repo.ui.status(_("remote has heads on branch '%s' that are "
+                                 "not known locally: %s\n") % (branch, heads))
         if remoteheads is None:
             if len(newhs) > 1:
                 dhs = list(newhs)