Show More
@@ -875,8 +875,6 b' class localrepository(repo.repository):' | |||||
875 | # all the revisions in parent->child order. |
|
875 | # all the revisions in parent->child order. | |
876 | mf1 = mfmatches(node1) |
|
876 | mf1 = mfmatches(node1) | |
877 |
|
877 | |||
878 | mywlock = False |
|
|||
879 |
|
||||
880 | # are we comparing the working directory? |
|
878 | # are we comparing the working directory? | |
881 | if not node2: |
|
879 | if not node2: | |
882 | (lookup, modified, added, removed, deleted, unknown, |
|
880 | (lookup, modified, added, removed, deleted, unknown, | |
@@ -886,22 +884,31 b' class localrepository(repo.repository):' | |||||
886 | # are we comparing working dir against its parent? |
|
884 | # are we comparing working dir against its parent? | |
887 | if compareworking: |
|
885 | if compareworking: | |
888 | if lookup: |
|
886 | if lookup: | |
|
887 | fixup = [] | |||
889 | # do a full compare of any files that might have changed |
|
888 | # do a full compare of any files that might have changed | |
890 | ctx = self.changectx() |
|
889 | ctx = self.changectx() | |
891 | for f in lookup: |
|
890 | for f in lookup: | |
892 | if f not in ctx or ctx[f].cmp(self.wread(f)): |
|
891 | if f not in ctx or ctx[f].cmp(self.wread(f)): | |
893 | modified.append(f) |
|
892 | modified.append(f) | |
894 | else: |
|
893 | else: | |
|
894 | fixup.append(f) | |||
895 | if list_clean: |
|
895 | if list_clean: | |
896 | clean.append(f) |
|
896 | clean.append(f) | |
897 | if not wlock and not mywlock: |
|
897 | ||
898 | mywlock = True |
|
898 | # update dirstate for files that are actually clean | |
899 |
|
|
899 | if fixup: | |
900 | wlock = self.wlock(wait=0) |
|
900 | cleanup = False | |
901 |
|
|
901 | if not wlock: | |
902 |
|
|
902 | try: | |
903 |
|
|
903 | wlock = self.wlock(wait=0) | |
|
904 | cleanup = True | |||
|
905 | except lock.LockException: | |||
|
906 | pass | |||
|
907 | if wlock: | |||
|
908 | for f in fixup: | |||
904 | self.dirstate.normal(f) |
|
909 | self.dirstate.normal(f) | |
|
910 | if cleanup: | |||
|
911 | wlock.release() | |||
905 | else: |
|
912 | else: | |
906 | # we are comparing working dir against non-parent |
|
913 | # we are comparing working dir against non-parent | |
907 | # generate a pseudo-manifest for the working dir |
|
914 | # generate a pseudo-manifest for the working dir | |
@@ -916,8 +923,6 b' class localrepository(repo.repository):' | |||||
916 | if f in mf2: |
|
923 | if f in mf2: | |
917 | del mf2[f] |
|
924 | del mf2[f] | |
918 |
|
925 | |||
919 | if mywlock and wlock: |
|
|||
920 | wlock.release() |
|
|||
921 | else: |
|
926 | else: | |
922 | # we are comparing two revisions |
|
927 | # we are comparing two revisions | |
923 | mf2 = mfmatches(node2) |
|
928 | mf2 = mfmatches(node2) |
General Comments 0
You need to be logged in to leave comments.
Login now