[PATCH 1 of 2] update: ignore commands.update.requiredest if HGPLAIN=1
Martin von Zweigbergk
martinvonz at google.com
Wed Mar 22 04:27:20 UTC 2017
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1490156520 25200
# Tue Mar 21 21:22:00 2017 -0700
# Node ID 2558f3d814f50681641fff9815d30129de2ab5ad
# Parent 13dc00c233b7e374a6fa0b9846510a94c2615671
update: ignore commands.update.requiredest if HGPLAIN=1
diff -r 13dc00c233b7 -r 2558f3d814f5 mercurial/commands.py
--- a/mercurial/commands.py Tue Mar 14 17:43:44 2017 -0700
+++ b/mercurial/commands.py Tue Mar 21 21:22:00 2017 -0700
@@ -5349,7 +5349,8 @@
if rev and node:
raise error.Abort(_("please specify just one revision"))
- if ui.configbool('commands', 'update.requiredest', False):
+ if (not ui.plain() and
+ ui.configbool('commands', 'update.requiredest', False)):
if not node and not rev and not date:
raise error.Abort(_('you must specify a destination'),
hint=_('for example: hg update ".::"'))
diff -r 13dc00c233b7 -r 2558f3d814f5 tests/test-update-names.t
--- a/tests/test-update-names.t Tue Mar 14 17:43:44 2017 -0700
+++ b/tests/test-update-names.t Tue Mar 21 21:22:00 2017 -0700
@@ -104,3 +104,5 @@
[255]
$ hg up .
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ HGPLAIN=1 hg up
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
More information about the Mercurial-devel
mailing list