Mercurial > public > mercurial-scm > hg-stable
diff hgext/graphlog.py @ 10084:4c844f16bf39 stable
graphlog: fix output when both a limit and a path are provided
Limit was interpreted as absolute, from the topmost revision, without
counting the number of revisions matching a given file.
Which caused "glog -lN file" to show sometimes less than N csets if
the file was not modified in all of the N previous csets.
glog will now match the behavior of log.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Fri, 11 Dec 2009 15:25:33 +0900 |
parents | 1c34fca5d785 |
children | ffa6f2eb934e |
line wrap: on
line diff
--- a/hgext/graphlog.py Wed Dec 16 12:10:21 2009 +0100 +++ b/hgext/graphlog.py Fri Dec 11 15:25:33 2009 +0900 @@ -241,15 +241,15 @@ check_unsupported_flags(opts) limit = cmdutil.loglimit(opts) start, stop = get_revs(repo, opts["rev"]) - stop = max(stop, start - limit + 1) if start == nullrev: return if path: path = util.canonpath(repo.root, os.getcwd(), path) if path: # could be reset in canonpath - revdag = graphmod.filerevs(repo, path, start, stop) + revdag = graphmod.filerevs(repo, path, start, stop, limit) else: + stop = max(stop, start - limit + 1) revdag = graphmod.revisions(repo, start, stop) displayer = show_changeset(ui, repo, opts, buffered=True)