# HG changeset patch # User Steve Losh # Date 1248331082 14400 # Node ID 240e531b5fc73d4b7766f91cadd9975e0df96fe8 # Parent 07e1b5f8e64187866f4fa134a6dc2d8cea6164ec Add the {update} keyword. diff -r 07e1b5f8e641 -r 240e531b5fc7 prompt.py --- a/prompt.py Thu Jul 23 02:06:25 2009 -0400 +++ b/prompt.py Thu Jul 23 02:38:02 2009 -0400 @@ -123,6 +123,11 @@ def _basename(m): return _with_groups(m.groups(), path.basename(repo.root)) if repo.root else '' + def _update(m): + curr = repo[None].parents()[0] + to = repo[repo.branchtags()[curr.branch()]] + return _with_groups(m.groups(), '^') if curr != to else '' + def _remote(kind): def _r(m): g = m.groups() @@ -162,6 +167,7 @@ 'root\|basename': _basename, 'status': _status, 'task': _task, + 'update': _update, 'incoming(\|count)?': _remote('incoming'), 'outgoing(\|count)?': _remote('outgoing'),