[PATCH 1 of 2] largefiles: don't clobber merge action message with user message
Martin von Zweigbergk
martinvonz at google.com
Wed Dec 3 19:45:26 UTC 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1416599097 28800
# Fri Nov 21 11:44:57 2014 -0800
# Node ID e615814e438cbe0254d89252e4f1ad385baac022
# Parent fc76f55705eb5884707c977ecb756aee7c794676
largefiles: don't clobber merge action message with user message
The message in the action is used for debugging and should not be the
same as the question presented to the user. Use a different variable
for the user message, so the 'msg' variable already in scope does not
get overwritten.
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -437,7 +437,7 @@
# the second parent
lfile = splitstandin
standin = f
- msg = _('remote turned local normal file %s into a largefile\n'
+ usermsg = _('remote turned local normal file %s into a largefile\n'
'use (l)argefile or keep (n)ormal file?'
'$$ &Largefile $$ &Normal file') % lfile
if (# local has unchanged normal file, pick remote largefile
@@ -447,7 +447,7 @@
not (pas and standin in pas[0] and
not pas[0][standin].cmp(p2[standin])) and
# else, prompt
- repo.ui.promptchoice(msg, 0) == 0
+ repo.ui.promptchoice(usermsg, 0) == 0
): # pick remote largefile
actions['r'].append((lfile, None, msg))
newglist.append((standin, (p2.flags(standin),), msg))
@@ -458,7 +458,7 @@
# the second parent
standin = lfutil.standin(f)
lfile = f
- msg = _('remote turned local largefile %s into a normal file\n'
+ usermsg = _('remote turned local largefile %s into a normal file\n'
'keep (l)argefile or use (n)ormal file?'
'$$ &Largefile $$ &Normal file') % lfile
if (# if remote has unchanged normal file, pick local largefile
@@ -468,7 +468,7 @@
not (pas and standin in pas[0] and
not pas[0][standin].cmp(p1[standin])) and
# else, prompt
- repo.ui.promptchoice(msg, 0) == 0
+ repo.ui.promptchoice(usermsg, 0) == 0
): # keep local largefile
if branchmerge:
# largefile can be restored from standin safely
More information about the Mercurial-devel
mailing list