Show More
@@ -505,9 +505,9 b' class queue:' | |||||
505 | # we go in two steps here so the strip loop happens in a |
|
505 | # we go in two steps here so the strip loop happens in a | |
506 | # sensible order. When stripping many files, this helps keep |
|
506 | # sensible order. When stripping many files, this helps keep | |
507 | # our disk access patterns under control. |
|
507 | # our disk access patterns under control. | |
508 | list = seen.keys() |
|
508 | seen_list = seen.keys() | |
509 | list.sort() |
|
509 | seen_list.sort() | |
510 | for f in list: |
|
510 | for f in seen_list: | |
511 | ff = repo.file(f) |
|
511 | ff = repo.file(f) | |
512 | filerev = seen[f] |
|
512 | filerev = seen[f] | |
513 | if filerev != 0: |
|
513 | if filerev != 0: | |
@@ -944,7 +944,7 b' class queue:' | |||||
944 | msg = '' |
|
944 | msg = '' | |
945 | self.ui.write('%s%s\n' % (patch, msg)) |
|
945 | self.ui.write('%s%s\n' % (patch, msg)) | |
946 | else: |
|
946 | else: | |
947 | list = [] |
|
947 | msng_list = [] | |
948 | for root, dirs, files in os.walk(self.path): |
|
948 | for root, dirs, files in os.walk(self.path): | |
949 | d = root[len(self.path) + 1:] |
|
949 | d = root[len(self.path) + 1:] | |
950 | for f in files: |
|
950 | for f in files: | |
@@ -952,10 +952,10 b' class queue:' | |||||
952 | if (fl not in self.series and |
|
952 | if (fl not in self.series and | |
953 | fl not in (self.status_path, self.series_path) |
|
953 | fl not in (self.status_path, self.series_path) | |
954 | and not fl.startswith('.')): |
|
954 | and not fl.startswith('.')): | |
955 | list.append(fl) |
|
955 | msng_list.append(fl) | |
956 | list.sort() |
|
956 | msng_list.sort() | |
957 | if list: |
|
957 | if msng_list: | |
958 | for x in list: |
|
958 | for x in msng_list: | |
959 | if self.ui.verbose: |
|
959 | if self.ui.verbose: | |
960 | self.ui.write("D ") |
|
960 | self.ui.write("D ") | |
961 | self.ui.write("%s\n" % x) |
|
961 | self.ui.write("%s\n" % x) | |
@@ -988,11 +988,10 b' class queue:' | |||||
988 | elif datastart != None: |
|
988 | elif datastart != None: | |
989 | l = lines[i].rstrip() |
|
989 | l = lines[i].rstrip() | |
990 | se = StatusEntry(l) |
|
990 | se = StatusEntry(l) | |
991 |
|
|
991 | file_ = se.name | |
992 |
|
|
992 | if se.rev: | |
993 | if id: |
|
|||
994 | applied.append(se) |
|
993 | applied.append(se) | |
995 | series.append(file) |
|
994 | series.append(file_) | |
996 | if datastart == None: |
|
995 | if datastart == None: | |
997 | self.ui.warn("No saved patch data found\n") |
|
996 | self.ui.warn("No saved patch data found\n") | |
998 | return 1 |
|
997 | return 1 | |
@@ -1389,20 +1388,20 b' def header(ui, repo, patch=None):' | |||||
1389 | ui.write('\n'.join(message) + '\n') |
|
1388 | ui.write('\n'.join(message) + '\n') | |
1390 |
|
1389 | |||
1391 | def lastsavename(path): |
|
1390 | def lastsavename(path): | |
1392 | (dir, base) = os.path.split(path) |
|
1391 | (directory, base) = os.path.split(path) | |
1393 | names = os.listdir(dir) |
|
1392 | names = os.listdir(directory) | |
1394 | namere = re.compile("%s.([0-9]+)" % base) |
|
1393 | namere = re.compile("%s.([0-9]+)" % base) | |
1395 | max = None |
|
1394 | maxindex = None | |
1396 | maxname = None |
|
1395 | maxname = None | |
1397 | for f in names: |
|
1396 | for f in names: | |
1398 | m = namere.match(f) |
|
1397 | m = namere.match(f) | |
1399 | if m: |
|
1398 | if m: | |
1400 | index = int(m.group(1)) |
|
1399 | index = int(m.group(1)) | |
1401 | if max == None or index > max: |
|
1400 | if maxindex == None or index > maxindex: | |
1402 | max = index |
|
1401 | maxindex = index | |
1403 | maxname = f |
|
1402 | maxname = f | |
1404 | if maxname: |
|
1403 | if maxname: | |
1405 | return (os.path.join(dir, maxname), max) |
|
1404 | return (os.path.join(directory, maxname), maxindex) | |
1406 | return (None, None) |
|
1405 | return (None, None) | |
1407 |
|
1406 | |||
1408 | def savename(path): |
|
1407 | def savename(path): |
General Comments 0
You need to be logged in to leave comments.
Login now