Mercurial > jhg
diff src/com/tmate/hgkit/fs/RepositoryLookup.java @ 48:e34f90b9ded1
Limit option for history/log
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 14 Jan 2011 23:22:20 +0100 |
parents | aa1912c70b36 |
children | 26e3eeaa3962 |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/fs/RepositoryLookup.java Fri Jan 14 20:03:14 2011 +0100 +++ b/src/com/tmate/hgkit/fs/RepositoryLookup.java Fri Jan 14 23:22:20 2011 +0100 @@ -56,6 +56,7 @@ public String repoLocation; public List<String> files; + public int limit = -1; public static Options parse(String[] commandLineArgs) { Options rv = new Options(); @@ -76,6 +77,13 @@ rv.repoLocation = it.next(); break; } + case (int) 'l' : { + if (!it.hasNext()) { + throw new IllegalArgumentException(); + } + rv.limit = Integer.parseInt(it.next()); + break; + } } } else { // filename