##// END OF EJS Templates
Fix some line wrapping...
mpm@selenic.com -
r741:156dc2f3 default
parent child Browse files
Show More
@@ -125,7 +125,8 b' class manifest(revlog):'
125 else:
125 else:
126 return mdiff.textdiff(a, b)
126 return mdiff.textdiff(a, b)
127
127
128 def add(self, map, flags, transaction, link, p1=None, p2=None,changed=None):
128 def add(self, map, flags, transaction, link, p1=None, p2=None,
129 changed=None):
129 # directly generate the mdiff delta from the data collected during
130 # directly generate the mdiff delta from the data collected during
130 # the bisect loop below
131 # the bisect loop below
131 def gendelta(delta):
132 def gendelta(delta):
@@ -137,7 +138,8 b' class manifest(revlog):'
137 l = delta[i][4]
138 l = delta[i][4]
138 if l == None:
139 if l == None:
139 l = ""
140 l = ""
140 while i < len(delta) - 1 and start <= delta[i+1][2] and end >= delta[i+1][2]:
141 while i < len(delta) - 1 and start <= delta[i+1][2] \
142 and end >= delta[i+1][2]:
141 if delta[i+1][3] > end:
143 if delta[i+1][3] > end:
142 end = delta[i+1][3]
144 end = delta[i+1][3]
143 if delta[i+1][4]:
145 if delta[i+1][4]:
@@ -177,7 +179,8 b' class manifest(revlog):'
177
179
178 # if we're using the listcache, make sure it is valid and
180 # if we're using the listcache, make sure it is valid and
179 # parented by the same node we're diffing against
181 # parented by the same node we're diffing against
180 if not changed or not self.listcache or not p1 or self.mapcache[0] != p1:
182 if not changed or not self.listcache or not p1 or \
183 self.mapcache[0] != p1:
181 files = map.keys()
184 files = map.keys()
182 files.sort()
185 files.sort()
183
186
@@ -201,14 +204,15 b' class manifest(revlog):'
201
204
202 for w in work:
205 for w in work:
203 f = w[0]
206 f = w[0]
204 # bs will either be the index of the item or the insertion point
207 # bs will either be the index of the item or the insert point
205 bs = bisect.bisect(addlist, f, bs)
208 bs = bisect.bisect(addlist, f, bs)
206 if bs < len(addlist):
209 if bs < len(addlist):
207 fn = addlist[bs][:addlist[bs].index('\0')]
210 fn = addlist[bs][:addlist[bs].index('\0')]
208 else:
211 else:
209 fn = None
212 fn = None
210 if w[1] == 0:
213 if w[1] == 0:
211 l = "%s\000%s%s\n" % (f, hex(map[f]), flags[f] and "x" or '')
214 l = "%s\000%s%s\n" % (f, hex(map[f]),
215 flags[f] and "x" or '')
212 else:
216 else:
213 l = None
217 l = None
214 start = bs
218 start = bs
@@ -814,7 +818,8 b' class localrepository:'
814 for f in remove:
818 for f in remove:
815 if f in m1:
819 if f in m1:
816 del m1[f]
820 del m1[f]
817 mn = self.manifest.add(m1, mf1, tr, linkrev, c1[0], c2[0], (new,remove))
821 mn = self.manifest.add(m1, mf1, tr, linkrev, c1[0], c2[0],
822 (new, remove))
818
823
819 # add changeset
824 # add changeset
820 new = new.keys()
825 new = new.keys()
@@ -864,7 +869,7 b' class localrepository:'
864 if not match(fn):
869 if not match(fn):
865 del mf[fn]
870 del mf[fn]
866 return mf
871 return mf
867
872
868 # are we comparing the working directory?
873 # are we comparing the working directory?
869 if not node2:
874 if not node2:
870 l, c, a, d, u = self.dirstate.changes(files, match)
875 l, c, a, d, u = self.dirstate.changes(files, match)
@@ -926,7 +931,7 b' class localrepository:'
926 if not os.path.exists(p):
931 if not os.path.exists(p):
927 self.ui.warn("%s does not exist!\n" % f)
932 self.ui.warn("%s does not exist!\n" % f)
928 elif not os.path.isfile(p):
933 elif not os.path.isfile(p):
929 self.ui.warn("%s not added: mercurial only supports files currently\n" % f)
934 self.ui.warn("%s not added: only files supported currently\n" % f)
930 elif self.dirstate.state(f) in 'an':
935 elif self.dirstate.state(f) in 'an':
931 self.ui.warn("%s already tracked!\n" % f)
936 self.ui.warn("%s already tracked!\n" % f)
932 else:
937 else:
General Comments 0
You need to be logged in to leave comments. Login now