Show More
@@ -418,7 +418,7 b' class queue:' | |||||
418 | commitfiles = c + a + r |
|
418 | commitfiles = c + a + r | |
419 | self.check_toppatch(repo) |
|
419 | self.check_toppatch(repo) | |
420 | wlock = repo.wlock() |
|
420 | wlock = repo.wlock() | |
421 | insert = self.series_end() |
|
421 | insert = self.full_series_end() | |
422 | if msg: |
|
422 | if msg: | |
423 | n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True, |
|
423 | n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True, | |
424 | wlock=wlock) |
|
424 | wlock=wlock) | |
@@ -1045,6 +1045,15 b' class queue:' | |||||
1045 | self.applied.append(revlog.hex(n) + ":" + '.hg.patches.save.line') |
|
1045 | self.applied.append(revlog.hex(n) + ":" + '.hg.patches.save.line') | |
1046 | self.applied_dirty = 1 |
|
1046 | self.applied_dirty = 1 | |
1047 |
|
1047 | |||
|
1048 | def full_series_end(self): | |||
|
1049 | if len(self.applied) > 0: | |||
|
1050 | (top, p) = self.applied[-1].split(':') | |||
|
1051 | end = self.find_series(p) | |||
|
1052 | if end == None: | |||
|
1053 | return len(self.full_series) | |||
|
1054 | return end + 1 | |||
|
1055 | return 0 | |||
|
1056 | ||||
1048 | def series_end(self): |
|
1057 | def series_end(self): | |
1049 | end = 0 |
|
1058 | end = 0 | |
1050 | if len(self.applied) > 0: |
|
1059 | if len(self.applied) > 0: | |
@@ -1132,7 +1141,7 b' class queue:' | |||||
1132 | if patch in self.series: |
|
1141 | if patch in self.series: | |
1133 | self.ui.warn("patch %s is already in the series file\n" % patch) |
|
1142 | self.ui.warn("patch %s is already in the series file\n" % patch) | |
1134 | sys.exit(1) |
|
1143 | sys.exit(1) | |
1135 | index = self.series_end() + i |
|
1144 | index = self.full_series_end() + i | |
1136 | self.full_series[index:index] = [patch] |
|
1145 | self.full_series[index:index] = [patch] | |
1137 | self.read_series(self.full_series) |
|
1146 | self.read_series(self.full_series) | |
1138 | self.ui.warn("adding %s to series file\n" % patch) |
|
1147 | self.ui.warn("adding %s to series file\n" % patch) |
General Comments 0
You need to be logged in to leave comments.
Login now