Commits

Yuya Nishihara committed 3c4c3b8

grep: look up parent revision of subrepo when annotating wctx of subrepo

Comments (0)

Files changed (1)

tortoisehg/hgqt/grep.py

                 root = paths.find_root(abs)
                 if root and abs.startswith(root):
                     path = abs[len(root)+1:]
+                    srepo = thgrepo.repository(None, root)
                     if rev is None:
-                        rev = repo['.'].rev()
-                    srepo = thgrepo.repository(None, root)
+                        rev = srepo['.'].rev()
                     opts = {'repo': srepo, 'canonpath' : path, 'rev' : rev,
                             'line': line, 'pattern': pattern, 'ignorecase': icase}
                     qtrun(run, ui, **opts)