Show More
@@ -2545,26 +2545,25 b' def debugobsolete(ui, repo, precursor=No' | |||||
2545 | try: |
|
2545 | try: | |
2546 | tr = repo.transaction('debugobsolete') |
|
2546 | tr = repo.transaction('debugobsolete') | |
2547 | try: |
|
2547 | try: | |
2548 | try: |
|
2548 | date = opts.get('date') | |
2549 |
|
|
2549 | if date: | |
2550 |
|
|
2550 | date = util.parsedate(date) | |
2551 | date = util.parsedate(date) |
|
2551 | else: | |
2552 |
|
|
2552 | date = None | |
2553 | date = None |
|
2553 | prec = parsenodeid(precursor) | |
2554 | prec = parsenodeid(precursor) |
|
2554 | parents = None | |
2555 |
|
|
2555 | if opts['record_parents']: | |
2556 |
if |
|
2556 | if prec not in repo.unfiltered(): | |
2557 | if prec not in repo.unfiltered(): |
|
2557 | raise util.Abort('cannot used --record-parents on ' | |
2558 | raise util.Abort('cannot used --record-parents on ' |
|
2558 | 'unknown changesets') | |
2559 | 'unknown changesets') |
|
2559 | parents = repo.unfiltered()[prec].parents() | |
2560 |
|
|
2560 | parents = tuple(p.node() for p in parents) | |
2561 | parents = tuple(p.node() for p in parents) |
|
2561 | repo.obsstore.create(tr, prec, succs, opts['flags'], | |
2562 | repo.obsstore.create(tr, prec, succs, opts['flags'], |
|
2562 | parents=parents, date=date, | |
2563 |
|
|
2563 | metadata=metadata) | |
2564 | metadata=metadata) |
|
2564 | tr.close() | |
2565 | tr.close() |
|
2565 | except ValueError, exc: | |
2566 | except ValueError, exc: |
|
2566 | raise util.Abort(_('bad obsmarker input: %s') % exc) | |
2567 | raise util.Abort(_('bad obsmarker input: %s') % exc) |
|
|||
2568 | finally: |
|
2567 | finally: | |
2569 | tr.release() |
|
2568 | tr.release() | |
2570 | finally: |
|
2569 | finally: |
General Comments 0
You need to be logged in to leave comments.
Login now