equal
deleted
inserted
replaced
2082 if not repo.capable('known'): |
2082 if not repo.capable('known'): |
2083 raise util.Abort("known() not supported by target repository") |
2083 raise util.Abort("known() not supported by target repository") |
2084 flags = repo.known([bin(s) for s in ids]) |
2084 flags = repo.known([bin(s) for s in ids]) |
2085 ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags]))) |
2085 ui.write("%s\n" % ("".join([f and "1" or "0" for f in flags]))) |
2086 |
2086 |
2087 @command('debugobsolete', [] + commitopts2, |
2087 @command('debugobsolete', |
|
2088 [('', 'flags', 0, _('markers flag')), |
|
2089 ] + commitopts2, |
2088 _('[OBSOLETED [REPLACEMENT] [REPL... ]')) |
2090 _('[OBSOLETED [REPLACEMENT] [REPL... ]')) |
2089 def debugobsolete(ui, repo, precursor=None, *successors, **opts): |
2091 def debugobsolete(ui, repo, precursor=None, *successors, **opts): |
2090 """create arbitrary obsolete marker""" |
2092 """create arbitrary obsolete marker""" |
2091 def parsenodeid(s): |
2093 def parsenodeid(s): |
2092 try: |
2094 try: |
2109 succs = tuple(parsenodeid(succ) for succ in successors) |
2111 succs = tuple(parsenodeid(succ) for succ in successors) |
2110 l = repo.lock() |
2112 l = repo.lock() |
2111 try: |
2113 try: |
2112 tr = repo.transaction('debugobsolete') |
2114 tr = repo.transaction('debugobsolete') |
2113 try: |
2115 try: |
2114 repo.obsstore.create(tr, parsenodeid(precursor), succs, 0, |
2116 repo.obsstore.create(tr, parsenodeid(precursor), succs, |
2115 metadata) |
2117 opts['flags'], metadata) |
2116 tr.close() |
2118 tr.close() |
2117 finally: |
2119 finally: |
2118 tr.release() |
2120 tr.release() |
2119 finally: |
2121 finally: |
2120 l.release() |
2122 l.release() |