mercurial/repair.py
changeset 16388 e03d8a40521f
parent 16253 17f179805297
child 16440 692bf06bb1af
equal deleted inserted replaced
16387:c481761033bd 16388:e03d8a40521f
    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)