Mercurial > hg-stable
changeset 7320:8dca507e56ce
ui: log non-interactive default response to stdout when verbose
This allows test scripts that feed their output into documentation
to properly show the session as it would appear to an end-user.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Fri, 07 Nov 2008 10:27:39 +0100 |
parents | eae1767cc6a8 |
children | e016b65fd284 |
files | mercurial/ui.py tests/test-merge-types.out tests/test-rename-merge2.out |
diffstat | 3 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Thu Nov 06 11:17:38 2008 +0100 +++ b/mercurial/ui.py Fri Nov 07 10:27:39 2008 +0100 @@ -421,7 +421,9 @@ If not interactive -- the default is returned """ - if not self.interactive: return default + if not self.interactive: + self.note(msg, ' ', default, "\n") + return default while True: try: r = self._readline(msg + ' ')
--- a/tests/test-merge-types.out Thu Nov 06 11:17:38 2008 +0100 +++ b/tests/test-merge-types.out Fri Nov 07 10:27:39 2008 +0100 @@ -5,6 +5,8 @@ overwrite None partial False ancestor c334dc3be0da local 521a1e40188f+ remote 3574f3e69b1c searching for copies back to rev 1 + conflicting flags for a +(n)one, e(x)ec or sym(l)ink? n a: update permissions -> e 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) @@ -15,6 +17,8 @@ overwrite None partial False ancestor c334dc3be0da local 3574f3e69b1c+ remote 521a1e40188f searching for copies back to rev 1 + conflicting flags for a +(n)one, e(x)ec or sym(l)ink? n a: remote is newer -> g getting a 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
--- a/tests/test-rename-merge2.out Thu Nov 06 11:17:38 2008 +0100 +++ b/tests/test-rename-merge2.out Fri Nov 07 10:27:39 2008 +0100 @@ -455,6 +455,8 @@ searching for copies back to rev 1 b: versions differ -> m rev: versions differ -> m +remote changed a which local deleted +use (c)hanged version or leave (d)eleted? c a: prompt recreating -> g preserving b for resolve of b preserving rev for resolve of rev @@ -480,6 +482,8 @@ overwrite None partial False ancestor 924404dff337 local 0b76e65c8289+ remote e03727d2d66b searching for copies back to rev 1 + local changed a which remote deleted +use (c)hanged version or (d)elete? c b: versions differ -> m rev: versions differ -> m preserving b for resolve of b