Mercurial > hg
comparison mercurial/localrepo.py @ 1532:27077812fffb
reset mtime when two files are equal
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 11 Nov 2005 15:34:17 -0800 |
parents | 2ba8bf7defda |
children | ccb9b62de892 |
comparison
equal
deleted
inserted
replaced
1531:2ba8bf7defda | 1532:27077812fffb |
---|---|
484 del mf[fn] | 484 del mf[fn] |
485 return mf | 485 return mf |
486 | 486 |
487 # are we comparing the working directory? | 487 # are we comparing the working directory? |
488 if not node2: | 488 if not node2: |
489 try: | |
490 wlock = self.wlock(wait=0) | |
491 except lock.LockHeld: | |
492 wlock = None | |
489 l, c, a, d, u = self.dirstate.changes(files, match) | 493 l, c, a, d, u = self.dirstate.changes(files, match) |
490 | 494 |
491 # are we comparing working dir against its parent? | 495 # are we comparing working dir against its parent? |
492 if not node1: | 496 if not node1: |
493 if l: | 497 if l: |
495 change = self.changelog.read(self.dirstate.parents()[0]) | 499 change = self.changelog.read(self.dirstate.parents()[0]) |
496 mf2 = mfmatches(change[0]) | 500 mf2 = mfmatches(change[0]) |
497 for f in l: | 501 for f in l: |
498 if fcmp(f, mf2): | 502 if fcmp(f, mf2): |
499 c.append(f) | 503 c.append(f) |
504 elif wlock is not None: | |
505 self.dirstate.update([f], "n") | |
500 | 506 |
501 for l in c, a, d, u: | 507 for l in c, a, d, u: |
502 l.sort() | 508 l.sort() |
503 | 509 |
504 return (c, a, d, u) | 510 return (c, a, d, u) |