Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 12619:7178f6fedb9d
cat: fix cat without -r, broken by 0ae35296fbf4
The default revision for revsingle() is now '.' instead of None. This
preserves the behavior of cat prior to it using revsingle().
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 08 Oct 2010 14:02:23 -0500 |
parents | 0ae35296fbf4 |
children | c52c629ce19e |
comparison
equal
deleted
inserted
replaced
12618:0ae35296fbf4 | 12619:7178f6fedb9d |
---|---|
109 raise util.Abort(_('limit must be positive')) | 109 raise util.Abort(_('limit must be positive')) |
110 else: | 110 else: |
111 limit = None | 111 limit = None |
112 return limit | 112 return limit |
113 | 113 |
114 def revsingle(repo, revspec, default=None): | 114 def revsingle(repo, revspec, default='.'): |
115 if not revspec: | 115 if not revspec: |
116 return repo[default] | 116 return repo[default] |
117 | 117 |
118 l = revrange(repo, [revspec]) | 118 l = revrange(repo, [revspec]) |
119 if len(l) < 1: | 119 if len(l) < 1: |