equal
deleted
inserted
replaced
2251 n = bin(s) |
2251 n = bin(s) |
2252 if len(n) != len(nullid): |
2252 if len(n) != len(nullid): |
2253 raise TypeError() |
2253 raise TypeError() |
2254 return n |
2254 return n |
2255 except TypeError: |
2255 except TypeError: |
2256 raise error.Abort( |
2256 raise error.InputError( |
2257 b'changeset references must be full hexadecimal ' |
2257 b'changeset references must be full hexadecimal ' |
2258 b'node identifiers' |
2258 b'node identifiers' |
2259 ) |
2259 ) |
2260 |
2260 |
2261 if opts.get(b'delete'): |
2261 if opts.get(b'delete'): |
2262 indices = [] |
2262 indices = [] |
2263 for v in opts.get(b'delete'): |
2263 for v in opts.get(b'delete'): |
2264 try: |
2264 try: |
2265 indices.append(int(v)) |
2265 indices.append(int(v)) |
2266 except ValueError: |
2266 except ValueError: |
2267 raise error.Abort( |
2267 raise error.InputError( |
2268 _(b'invalid index value: %r') % v, |
2268 _(b'invalid index value: %r') % v, |
2269 hint=_(b'use integers for indices'), |
2269 hint=_(b'use integers for indices'), |
2270 ) |
2270 ) |
2271 |
2271 |
2272 if repo.currenttransaction(): |
2272 if repo.currenttransaction(): |
2280 |
2280 |
2281 return |
2281 return |
2282 |
2282 |
2283 if precursor is not None: |
2283 if precursor is not None: |
2284 if opts[b'rev']: |
2284 if opts[b'rev']: |
2285 raise error.Abort(b'cannot select revision when creating marker') |
2285 raise error.InputError( |
|
2286 b'cannot select revision when creating marker' |
|
2287 ) |
2286 metadata = {} |
2288 metadata = {} |
2287 metadata[b'user'] = encoding.fromlocal(opts[b'user'] or ui.username()) |
2289 metadata[b'user'] = encoding.fromlocal(opts[b'user'] or ui.username()) |
2288 succs = tuple(parsenodeid(succ) for succ in successors) |
2290 succs = tuple(parsenodeid(succ) for succ in successors) |
2289 l = repo.lock() |
2291 l = repo.lock() |
2290 try: |
2292 try: |