equal
deleted
inserted
replaced
52 for fname in files: |
52 for fname in files: |
53 collectone(repo.file(fname)) |
53 collectone(repo.file(fname)) |
54 |
54 |
55 return s |
55 return s |
56 |
56 |
57 def strip(ui, repo, nodelist, backup="all"): |
57 def strip(ui, repo, nodelist, backup="all", topic='backup'): |
58 cl = repo.changelog |
58 cl = repo.changelog |
59 # TODO handle undo of merge sets |
59 # TODO handle undo of merge sets |
60 if isinstance(nodelist, str): |
60 if isinstance(nodelist, str): |
61 nodelist = [nodelist] |
61 nodelist = [nodelist] |
62 striplist = [cl.rev(node) for node in nodelist] |
62 striplist = [cl.rev(node) for node in nodelist] |
103 updatebm.append(m) |
103 updatebm.append(m) |
104 |
104 |
105 # create a changegroup for all the branches we need to keep |
105 # create a changegroup for all the branches we need to keep |
106 backupfile = None |
106 backupfile = None |
107 if backup == "all": |
107 if backup == "all": |
108 backupfile = _bundle(repo, stripbases, cl.heads(), node, 'backup') |
108 backupfile = _bundle(repo, stripbases, cl.heads(), node, topic) |
109 repo.ui.status(_("saved backup bundle to %s\n") % backupfile) |
109 repo.ui.status(_("saved backup bundle to %s\n") % backupfile) |
110 if saveheads or savebases: |
110 if saveheads or savebases: |
111 # do not compress partial bundle if we remove it from disk later |
111 # do not compress partial bundle if we remove it from disk later |
112 chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp', |
112 chgrpfile = _bundle(repo, savebases, saveheads, node, 'temp', |
113 compress=keeppartialbundle) |
113 compress=keeppartialbundle) |