mercurial/commands.py
changeset 1037 c0a1abf562eb
parent 1034 8dbbea5bc844
child 1039 4296754ba7b4
equal deleted inserted replaced
1035:bcb44382b0d0 1037:c0a1abf562eb
   843     # This code most commonly needs to iterate backwards over the
   843     # This code most commonly needs to iterate backwards over the
   844     # history it is interested in.  This has awful (quadratic-looking)
   844     # history it is interested in.  This has awful (quadratic-looking)
   845     # performance, so we use iterators that walk forwards through
   845     # performance, so we use iterators that walk forwards through
   846     # windows of revisions, yielding revisions in reverse order, while
   846     # windows of revisions, yielding revisions in reverse order, while
   847     # walking the windows backwards.
   847     # walking the windows backwards.
   848     files, matchfn, anypats = matchpats(repo, repo.getcwd(), pats, opts)
   848     cwd = repo.getcwd()
       
   849     if not pats and cwd:
       
   850         opts['include'] = [os.path.join(cwd, i) for i in opts['include']]
       
   851         opts['exclude'] = [os.path.join(cwd, x) for x in opts['exclude']]
       
   852     files, matchfn, anypats = matchpats(repo, (pats and cwd) or '',
       
   853                                         pats, opts)
   849     revs = map(int, revrange(ui, repo, opts['rev'] or ['tip:0']))
   854     revs = map(int, revrange(ui, repo, opts['rev'] or ['tip:0']))
   850     wanted = {}
   855     wanted = {}
   851     slowpath = anypats
   856     slowpath = anypats
   852     window = 300
   857     window = 300
   853     if not slowpath and not files:
   858     if not slowpath and not files: