mercurial/commands.py
changeset 904 969647d5100a
parent 899 aa5b726e9619
child 905 65763ff9fa53
equal deleted inserted replaced
903:71be6dd282d1 904:969647d5100a
   143     if hasattr(pat, 'read') and 'r' in mode:
   143     if hasattr(pat, 'read') and 'r' in mode:
   144         return pat
   144         return pat
   145     return open(make_filename(repo, r, pat, node, total, seqno, revwidth),
   145     return open(make_filename(repo, r, pat, node, total, seqno, revwidth),
   146                 mode)
   146                 mode)
   147 
   147 
   148 def dodiff(fp, ui, repo, files=None, node1=None, node2=None, match=util.always):
   148 def dodiff(fp, ui, repo, files=None, node1=None, node2=None, match=util.always, changes=None):
   149     def date(c):
   149     def date(c):
   150         return time.asctime(time.gmtime(float(c[2].split(' ')[0])))
   150         return time.asctime(time.gmtime(float(c[2].split(' ')[0])))
   151 
   151 
   152     (c, a, d, u) = repo.changes(node1, node2, files, match = match)
   152     if not changes:
       
   153         (c, a, d, u) = repo.changes(node1, node2, files, match = match)
       
   154     else:
       
   155         (c, a, d, u) = changes
   153     if files:
   156     if files:
   154         c, a, d = map(lambda x: filterfiles(files, x), (c, a, d))
   157         c, a, d = map(lambda x: filterfiles(files, x), (c, a, d))
   155 
   158 
   156     if not c and not a and not d:
   159     if not c and not a and not d:
   157         return
   160         return