Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 4196:1c69c73d85d9
locate: exit(1) if we didn't print any file
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 23:00:58 -0300 |
parents | e8ee8fdeddb1 |
children | b5d1eaade333 e14b6980a014 |
comparison
equal
deleted
inserted
replaced
4195:e8ee8fdeddb1 | 4196:1c69c73d85d9 |
---|---|
1618 if rev: | 1618 if rev: |
1619 node = repo.lookup(rev) | 1619 node = repo.lookup(rev) |
1620 else: | 1620 else: |
1621 node = None | 1621 node = None |
1622 | 1622 |
1623 ret = 1 | |
1623 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, | 1624 for src, abs, rel, exact in cmdutil.walk(repo, pats, opts, node=node, |
1624 default='relglob'): | 1625 default='relglob'): |
1625 if not node and repo.dirstate.state(abs) == '?': | 1626 if not node and repo.dirstate.state(abs) == '?': |
1626 continue | 1627 continue |
1627 if opts['fullpath']: | 1628 if opts['fullpath']: |
1628 ui.write(os.path.join(repo.root, abs), end) | 1629 ui.write(os.path.join(repo.root, abs), end) |
1629 else: | 1630 else: |
1630 ui.write(((pats and rel) or abs), end) | 1631 ui.write(((pats and rel) or abs), end) |
1632 ret = 0 | |
1633 | |
1634 return ret | |
1631 | 1635 |
1632 def log(ui, repo, *pats, **opts): | 1636 def log(ui, repo, *pats, **opts): |
1633 """show revision history of entire repository or files | 1637 """show revision history of entire repository or files |
1634 | 1638 |
1635 Print the revision history of the specified files or the entire | 1639 Print the revision history of the specified files or the entire |