mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
hgext: use commit hashes to call other commands
Summary: Search for `commands.(update|rebase)` and change them accordingly to avoid triggering revnum deprecation messages. Reviewed By: singhsrb Differential Revision: D16964237 fbshipit-source-id: c12077c6e143766cba5264cc1fbe0d8cc15c69a2
This commit is contained in:
parent
06859de4e2
commit
4a8387c725
@ -148,7 +148,7 @@ def _moverelative(ui, repo, args, opts, reverse=False):
|
|||||||
# If we have both --clean and --rebase, we need to discard any outstanding
|
# If we have both --clean and --rebase, we need to discard any outstanding
|
||||||
# changes now before we attempt to perform any rebases.
|
# changes now before we attempt to perform any rebases.
|
||||||
if opts.get("clean") and opts.get("rebase"):
|
if opts.get("clean") and opts.get("rebase"):
|
||||||
commands.update(ui, repo, rev=repo["."].rev(), clean=True)
|
commands.update(ui, repo, rev=repo["."].hex(), clean=True)
|
||||||
|
|
||||||
with repo.wlock(), repo.lock():
|
with repo.wlock(), repo.lock():
|
||||||
# Record the active bookmark, if any.
|
# Record the active bookmark, if any.
|
||||||
|
@ -53,4 +53,4 @@ def restack(ui, repo, **rebaseopts):
|
|||||||
# to do this manually.
|
# to do this manually.
|
||||||
successor = repo.revs("successors(.) - .").last()
|
successor = repo.revs("successors(.) - .").last()
|
||||||
if successor is not None:
|
if successor is not None:
|
||||||
commands.update(ui, repo, rev=successor)
|
commands.update(ui, repo, rev=repo[successor].hex())
|
||||||
|
@ -260,7 +260,7 @@ def perftestsuitecmd(ui, repo, *revs, **opts):
|
|||||||
|
|
||||||
if opts["rev"]:
|
if opts["rev"]:
|
||||||
ui.status(_("updating to %s...\n") % (opts["rev"]))
|
ui.status(_("updating to %s...\n") % (opts["rev"]))
|
||||||
commands.update(ui, repo, scmutil.revsingle(repo, opts["rev"]).rev())
|
commands.update(ui, repo, scmutil.revsingle(repo, opts["rev"]).hex())
|
||||||
|
|
||||||
suite = perftestsuite(
|
suite = perftestsuite(
|
||||||
repo,
|
repo,
|
||||||
|
Loading…
Reference in New Issue
Block a user