Show More
@@ -5,7 +5,7 b'' | |||||
5 | # This software may be used and distributed according to the terms |
|
5 | # This software may be used and distributed according to the terms | |
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
8 | import sys, struct, sha, socket, os, time, base64, re, urllib2 |
|
8 | import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii | |
9 | from mercurial import byterange |
|
9 | from mercurial import byterange | |
10 | from mercurial.transaction import * |
|
10 | from mercurial.transaction import * | |
11 | from mercurial.revlog import * |
|
11 | from mercurial.revlog import * | |
@@ -255,8 +255,8 b' class repository:' | |||||
255 | if not self.remote: |
|
255 | if not self.remote: | |
256 | self.dircache = dircache(self.opener) |
|
256 | self.dircache = dircache(self.opener) | |
257 | try: |
|
257 | try: | |
258 | self.current = bin(self.open("current").read()) |
|
258 | self.current = bin(self.opener("current").read()) | |
259 | except: |
|
259 | except IOError: | |
260 | self.current = None |
|
260 | self.current = None | |
261 |
|
261 | |||
262 | def setcurrent(self, node): |
|
262 | def setcurrent(self, node): | |
@@ -477,12 +477,12 b' class repository:' | |||||
477 | def diffdir(self, path): |
|
477 | def diffdir(self, path): | |
478 | dc = self.dircache.copy() |
|
478 | dc = self.dircache.copy() | |
479 | changed = [] |
|
479 | changed = [] | |
|
480 | mf = {} | |||
480 | added = [] |
|
481 | added = [] | |
481 |
|
482 | |||
482 | mmap = {} |
|
|||
483 | if self.current: |
|
483 | if self.current: | |
484 | change = self.changelog.read(self.current) |
|
484 | change = self.changelog.read(self.current) | |
485 |
m |
|
485 | mf = self.manifest.read(change[0]) | |
486 |
|
486 | |||
487 | for dir, subdirs, files in os.walk(self.root): |
|
487 | for dir, subdirs, files in os.walk(self.root): | |
488 | d = dir[len(self.root)+1:] |
|
488 | d = dir[len(self.root)+1:] | |
@@ -499,7 +499,7 b' class repository:' | |||||
499 | changed.append(fn) |
|
499 | changed.append(fn) | |
500 | elif c[0] != s.st_mode or c[2] != s.st_mtime: |
|
500 | elif c[0] != s.st_mode or c[2] != s.st_mtime: | |
501 | t1 = file(fn).read() |
|
501 | t1 = file(fn).read() | |
502 |
t2 = self.file(fn).revision(m |
|
502 | t2 = self.file(fn).revision(mf[fn]) | |
503 | if t1 != t2: |
|
503 | if t1 != t2: | |
504 | changed.append(fn) |
|
504 | changed.append(fn) | |
505 | else: |
|
505 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now