Show More
@@ -6,7 +6,8 b'' | |||
|
6 | 6 | # This software may be used and distributed according to the terms |
|
7 | 7 | # of the GNU General Public License, incorporated herein by reference. |
|
8 | 8 | |
|
9 |
import changegroup, |
|
|
9 | import changegroup, os | |
|
10 | from node import * | |
|
10 | 11 | |
|
11 | 12 | def strip(ui, repo, rev, backup="all"): |
|
12 | 13 | def limitheads(chlog, stop): |
@@ -34,7 +35,7 b' def strip(ui, repo, rev, backup="all"):' | |||
|
34 | 35 | backupdir = repo.join("strip-backup") |
|
35 | 36 | if not os.path.isdir(backupdir): |
|
36 | 37 | os.mkdir(backupdir) |
|
37 |
name = os.path.join(backupdir, "%s-%s" % ( |
|
|
38 | name = os.path.join(backupdir, "%s-%s" % (short(rev), suffix)) | |
|
38 | 39 | ui.warn("saving bundle to %s\n" % name) |
|
39 | 40 | return changegroup.writebundle(cg, name, "HG10BZ") |
|
40 | 41 | |
@@ -90,11 +91,11 b' def strip(ui, repo, rev, backup="all"):' | |||
|
90 | 91 | while True: |
|
91 | 92 | seen[n] = 1 |
|
92 | 93 | pp = chlog.parents(n) |
|
93 |
if pp[1] != |
|
|
94 | if pp[1] != nullid: | |
|
94 | 95 | for p in pp: |
|
95 | 96 | if chlog.rev(p) > revnum and p not in seen: |
|
96 | 97 | heads.append(p) |
|
97 |
if pp[0] == |
|
|
98 | if pp[0] == nullid: | |
|
98 | 99 | break |
|
99 | 100 | if chlog.rev(pp[0]) < revnum: |
|
100 | 101 | break |
General Comments 0
You need to be logged in to leave comments.
Login now