# HG changeset patch # User TK Soh # Date 1129691173 25200 # Node ID 6fd6527f95eb4bc4df86a84cfbfe248dcd258043 # Parent 67e20e27d8df5b044707a344d1fd349c9b0d1714 log: speedup keyword search when used with --branch By avoiding unnecessary branch lookup. diff -r 67e20e27d8df -r 6fd6527f95eb mercurial/commands.py --- a/mercurial/commands.py Tue Oct 18 20:06:05 2005 -0700 +++ b/mercurial/commands.py Tue Oct 18 20:06:13 2005 -0700 @@ -1274,9 +1274,6 @@ elif st == 'add': du.bump(rev) br = None - if opts['branch']: - br = repo.branchlookup([repo.changelog.node(rev)]) - if opts['keyword']: changes = repo.changelog.read(repo.changelog.node(rev)) miss = 0 @@ -1289,6 +1286,9 @@ if miss: continue + if opts['branch']: + br = repo.branchlookup([repo.changelog.node(rev)]) + show_changeset(du, repo, rev, brinfo=br) if opts['patch']: changenode = repo.changelog.node(rev)