equal
deleted
inserted
replaced
1002 lockmod.release(tr, lock, wlock) |
1002 lockmod.release(tr, lock, wlock) |
1003 |
1003 |
1004 @eh.command( |
1004 @eh.command( |
1005 '^touch', |
1005 '^touch', |
1006 [('r', 'rev', [], 'revision to update'), |
1006 [('r', 'rev', [], 'revision to update'), |
|
1007 ('n', 'note', '', _('store a note on touch')), |
1007 ('D', 'duplicate', False, |
1008 ('D', 'duplicate', False, |
1008 'do not mark the new revision as successor of the old one'), |
1009 'do not mark the new revision as successor of the old one'), |
1009 ('A', 'allowdivergence', False, |
1010 ('A', 'allowdivergence', False, |
1010 'mark the new revision as successor of the old one potentially creating ' |
1011 'mark the new revision as successor of the old one potentially creating ' |
1011 'divergence')], |
1012 'divergence')], |
1015 """create successors that are identical to their predecessors except |
1016 """create successors that are identical to their predecessors except |
1016 for the changeset ID |
1017 for the changeset ID |
1017 |
1018 |
1018 This is used to "resurrect" changesets |
1019 This is used to "resurrect" changesets |
1019 """ |
1020 """ |
|
1021 _checknotesize(opts) |
1020 duplicate = opts['duplicate'] |
1022 duplicate = opts['duplicate'] |
1021 allowdivergence = opts['allowdivergence'] |
1023 allowdivergence = opts['allowdivergence'] |
1022 revs = list(revs) |
1024 revs = list(revs) |
1023 revs.extend(opts['rev']) |
1025 revs.extend(opts['rev']) |
1024 if not revs: |
1026 if not revs: |
1078 commitopts=extradict) |
1080 commitopts=extradict) |
1079 # store touched version to help potential children |
1081 # store touched version to help potential children |
1080 newmapping[ctx.node()] = new |
1082 newmapping[ctx.node()] = new |
1081 |
1083 |
1082 if not duplicate: |
1084 if not duplicate: |
1083 obsolete.createmarkers(repo, [(ctx, (repo[new],))]) |
1085 metadata = {} |
|
1086 if opts.get('note'): |
|
1087 metadata['note'] = opts['note'] |
|
1088 obsolete.createmarkers(repo, [(ctx, (repo[new],))], |
|
1089 metadata=metadata) |
1084 phases.retractboundary(repo, tr, ctx.phase(), [new]) |
1090 phases.retractboundary(repo, tr, ctx.phase(), [new]) |
1085 if ctx in repo[None].parents(): |
1091 if ctx in repo[None].parents(): |
1086 with repo.dirstate.parentchange(): |
1092 with repo.dirstate.parentchange(): |
1087 repo.dirstate.setparents(new, node.nullid) |
1093 repo.dirstate.setparents(new, node.nullid) |
1088 tr.close() |
1094 tr.close() |