mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
bisect: remove revnum from output
Reviewed By: singhsrb Differential Revision: D24201938 fbshipit-source-id: a6443465feac1ba43962e44a679091f655b24d16
This commit is contained in:
parent
b01b79cf76
commit
ec02fad2c6
@ -981,18 +981,9 @@ def bisect(
|
||||
nodestate = hbisect.checksparsebisectskip(repo, node, badnode, goodnode)
|
||||
while nodestate != "check":
|
||||
basenode = goodnode if nodestate == "good" else badnode
|
||||
skipsparsed = "Skipping changeset %d:%s as there are no changes inside\n\
|
||||
the sparse profile from the known %s changeset %d:%s\n"
|
||||
ui.write(
|
||||
_(skipsparsed)
|
||||
% (
|
||||
repo.changelog.rev(node),
|
||||
short(node),
|
||||
nodestate,
|
||||
repo.changelog.rev(basenode),
|
||||
short(basenode),
|
||||
)
|
||||
)
|
||||
skipsparsed = "Skipping changeset %s as there are no changes inside\n\
|
||||
the sparse profile from the known %s changeset %s\n"
|
||||
ui.write(_(skipsparsed) % (short(node), nodestate, short(basenode)))
|
||||
|
||||
state[nodestate].append(node)
|
||||
|
||||
@ -1050,7 +1041,7 @@ the sparse profile from the known %s changeset %d:%s\n"
|
||||
transition = "bad"
|
||||
state[transition].append(node)
|
||||
ctx = repo[node]
|
||||
ui.status(_("changeset %d:%s: %s\n") % (ctx, ctx, transition))
|
||||
ui.status(_("changeset %s: %s\n") % (ctx, transition))
|
||||
hbisect.checkstate(state)
|
||||
# bisect
|
||||
nodes, changesets, bgood, badnode, goodnode = hbisect.bisect(
|
||||
@ -1093,12 +1084,10 @@ the sparse profile from the known %s changeset %d:%s\n"
|
||||
if not changesets:
|
||||
extendnode = hbisect.extendrange(repo, state, nodes, good)
|
||||
if extendnode is not None:
|
||||
extnode, extrev = extendnode.node(), extendnode.rev()
|
||||
extnode = extendnode.node()
|
||||
state["current"] = [extnode]
|
||||
hbisect.save_state(repo, state)
|
||||
ui.write(
|
||||
_("Extending search to changeset %d:%s\n") % (extrev, extendnode)
|
||||
)
|
||||
ui.write(_("Extending search to changeset %s\n") % extendnode)
|
||||
|
||||
if not nosparseskip:
|
||||
node, changesets, good = sparseskip(
|
||||
|
@ -71,10 +71,10 @@ verify bisect skips empty sparse commits (2,3)
|
||||
$ hg up 'max(desc(bad))'
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg bisect --bad
|
||||
Skipping changeset 4:e116419d642b as there are no changes inside
|
||||
the sparse profile from the known good changeset 0:a75e20cc7b2a
|
||||
Skipping changeset 6:6b9461e31152 as there are no changes inside
|
||||
the sparse profile from the known bad changeset 9:d910e57b873b
|
||||
Skipping changeset e116419d642b as there are no changes inside
|
||||
the sparse profile from the known good changeset a75e20cc7b2a
|
||||
Skipping changeset 6b9461e31152 as there are no changes inside
|
||||
the sparse profile from the known bad changeset d910e57b873b
|
||||
Testing changeset 2ecc2db0df15 (2 changesets remaining, ~1 tests)
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg bisect --good
|
||||
@ -124,12 +124,12 @@ verify skipping works with --command flag
|
||||
$ hg up 'max(desc(bad))'
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg bisect --command "hg debugpython -- script.py"
|
||||
changeset 9:d910e57b873b: bad
|
||||
Skipping changeset 4:e116419d642b as there are no changes inside
|
||||
the sparse profile from the known good changeset 0:a75e20cc7b2a
|
||||
Skipping changeset 6:6b9461e31152 as there are no changes inside
|
||||
the sparse profile from the known bad changeset 9:d910e57b873b
|
||||
changeset 5:2ecc2db0df15: good
|
||||
changeset d910e57b873b: bad
|
||||
Skipping changeset e116419d642b as there are no changes inside
|
||||
the sparse profile from the known good changeset a75e20cc7b2a
|
||||
Skipping changeset 6b9461e31152 as there are no changes inside
|
||||
the sparse profile from the known bad changeset d910e57b873b
|
||||
changeset 2ecc2db0df15: good
|
||||
The first bad revision is:
|
||||
commit: 6b9461e31152
|
||||
user: test
|
||||
@ -188,8 +188,8 @@ New test set
|
||||
|
||||
$ hg bisect -g a6b1a23ad56a41a184666a5c633a51117fec5208
|
||||
$ hg bisect -b 'desc(14)'
|
||||
Skipping changeset 9:d910e57b873b as there are no changes inside
|
||||
the sparse profile from the known good changeset 8:a6b1a23ad56a
|
||||
Skipping changeset d910e57b873b as there are no changes inside
|
||||
the sparse profile from the known good changeset a6b1a23ad56a
|
||||
Testing changeset a41c9f2666a8 (2 changesets remaining, ~1 tests)
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg bisect --bad
|
||||
@ -208,14 +208,14 @@ New test set
|
||||
|
||||
|
||||
$ hg bisect --extend
|
||||
Extending search to changeset 7:94c6ab768eff
|
||||
Skipping changeset 7:94c6ab768eff as there are no changes inside
|
||||
the sparse profile from the known good changeset 9:d910e57b873b
|
||||
Extending search to changeset 94c6ab768eff
|
||||
Skipping changeset 94c6ab768eff as there are no changes inside
|
||||
the sparse profile from the known good changeset d910e57b873b
|
||||
Testing changeset 7038c7a4f757 (4 changesets remaining, ~2 tests)
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg bisect --good
|
||||
Skipping changeset 12:e694d9484bb8 as there are no changes inside
|
||||
the sparse profile from the known bad changeset 13:a41c9f2666a8
|
||||
Skipping changeset e694d9484bb8 as there are no changes inside
|
||||
the sparse profile from the known bad changeset a41c9f2666a8
|
||||
The first bad revision is:
|
||||
commit: e694d9484bb8
|
||||
user: test
|
||||
@ -265,11 +265,11 @@ Empty case with --command flag: all commits are skipped
|
||||
$ hg bisect --reset
|
||||
$ hg bisect -g 6e74f05c0613d7861ac62eefb6974abf63ecce4f
|
||||
$ hg bisect -c "test $(hg log -r . -T '{rev}') -lt 17"
|
||||
changeset 18:ddea298cfd5a: bad
|
||||
Skipping changeset 16:8654dd939818 as there are no changes inside
|
||||
the sparse profile from the known good changeset 15:6e74f05c0613
|
||||
Skipping changeset 17:9ca8d13c5161 as there are no changes inside
|
||||
the sparse profile from the known bad changeset 18:ddea298cfd5a
|
||||
changeset ddea298cfd5a: bad
|
||||
Skipping changeset 8654dd939818 as there are no changes inside
|
||||
the sparse profile from the known good changeset 6e74f05c0613
|
||||
Skipping changeset 9ca8d13c5161 as there are no changes inside
|
||||
the sparse profile from the known bad changeset ddea298cfd5a
|
||||
The first bad revision is:
|
||||
commit: 9ca8d13c5161
|
||||
user: test
|
||||
|
@ -454,7 +454,7 @@ sh % """
|
||||
hg bisect --command \
|
||||
\"hg debugshell -c \\\"sys.exit(1 if (repo['.'].rev() < 6) else 0)\\\"\"
|
||||
""" == r"""
|
||||
changeset 31:58c80a7c8a40: good
|
||||
changeset 58c80a7c8a40: good
|
||||
abort: cannot bisect (no known bad revisions)
|
||||
[255]"""
|
||||
sh % "hg up -qr 0"
|
||||
@ -462,12 +462,12 @@ sh % """
|
||||
hg bisect --command \
|
||||
\"hg debugshell -c \\\"sys.exit(1 if (repo['.'].rev() < 6) else 0)\\\"\"
|
||||
""" == r"""
|
||||
changeset 0:b99c7b9c8e11: bad
|
||||
changeset 15:e7fa0811edb0: good
|
||||
changeset 7:03750880c6b5: good
|
||||
changeset 3:b53bea5e2fcb: bad
|
||||
changeset 5:7874a09ea728: bad
|
||||
changeset 6:a3d5c6fdf0d3: good
|
||||
changeset b99c7b9c8e11: bad
|
||||
changeset e7fa0811edb0: good
|
||||
changeset 03750880c6b5: good
|
||||
changeset b53bea5e2fcb: bad
|
||||
changeset 7874a09ea728: bad
|
||||
changeset a3d5c6fdf0d3: good
|
||||
The first good revision is:
|
||||
commit: a3d5c6fdf0d3
|
||||
user: test
|
||||
@ -493,11 +493,11 @@ sh % "hg bisect -r"
|
||||
sh % "hg bisect --good tip --noupdate"
|
||||
sh % "hg bisect --bad 0 --noupdate" == "Testing changeset e7fa0811edb0 (31 changesets remaining, ~4 tests)"
|
||||
sh % "hg bisect --command 'sh script.sh and some params' --noupdate" == r"""
|
||||
changeset 15:e7fa0811edb0: good
|
||||
changeset 7:03750880c6b5: good
|
||||
changeset 3:b53bea5e2fcb: bad
|
||||
changeset 5:7874a09ea728: bad
|
||||
changeset 6:a3d5c6fdf0d3: good
|
||||
changeset e7fa0811edb0: good
|
||||
changeset 03750880c6b5: good
|
||||
changeset b53bea5e2fcb: bad
|
||||
changeset 7874a09ea728: bad
|
||||
changeset a3d5c6fdf0d3: good
|
||||
The first good revision is:
|
||||
commit: a3d5c6fdf0d3
|
||||
user: test
|
||||
@ -523,17 +523,17 @@ sh % "chmod +x script.sh"
|
||||
sh % "hg bisect -r"
|
||||
sh % "hg up -qr tip"
|
||||
sh % "hg bisect --command 'sh script.sh and some params'" == r"""
|
||||
changeset 31:58c80a7c8a40: good
|
||||
changeset 58c80a7c8a40: good
|
||||
abort: cannot bisect (no known bad revisions)
|
||||
[255]"""
|
||||
sh % "hg up -qr 0"
|
||||
sh % "hg bisect --command 'sh script.sh and some params'" == r"""
|
||||
changeset 0:b99c7b9c8e11: bad
|
||||
changeset 15:e7fa0811edb0: good
|
||||
changeset 7:03750880c6b5: good
|
||||
changeset 3:b53bea5e2fcb: bad
|
||||
changeset 5:7874a09ea728: bad
|
||||
changeset 6:a3d5c6fdf0d3: good
|
||||
changeset b99c7b9c8e11: bad
|
||||
changeset e7fa0811edb0: good
|
||||
changeset 03750880c6b5: good
|
||||
changeset b53bea5e2fcb: bad
|
||||
changeset 7874a09ea728: bad
|
||||
changeset a3d5c6fdf0d3: good
|
||||
The first good revision is:
|
||||
commit: a3d5c6fdf0d3
|
||||
user: test
|
||||
@ -566,10 +566,10 @@ sh % "hg bisect --bad 30" == r"""
|
||||
Testing changeset 06c7993750ce (15 changesets remaining, ~3 tests)
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved"""
|
||||
sh % "hg bisect --command true" == r"""
|
||||
changeset 22:06c7993750ce: good
|
||||
changeset 26:3efc6fd51aeb: good
|
||||
changeset 28:8e0c2264c8af: good
|
||||
changeset 29:b5bd63375ab9: good
|
||||
changeset 06c7993750ce: good
|
||||
changeset 3efc6fd51aeb: good
|
||||
changeset 8e0c2264c8af: good
|
||||
changeset b5bd63375ab9: good
|
||||
The first bad revision is:
|
||||
commit: ed2d2f24b11c
|
||||
user: test
|
||||
@ -588,8 +588,8 @@ sh % "hg bisect --bad 25" == r"""
|
||||
Testing changeset 8e0c2264c8af (6 changesets remaining, ~2 tests)
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved"""
|
||||
sh % "hg bisect --command true" == r"""
|
||||
changeset 28:8e0c2264c8af: good
|
||||
changeset 26:3efc6fd51aeb: good
|
||||
changeset 8e0c2264c8af: good
|
||||
changeset 3efc6fd51aeb: good
|
||||
The first good revision is:
|
||||
commit: 3efc6fd51aeb
|
||||
user: test
|
||||
|
@ -641,7 +641,7 @@ end at merge: 17 bad, 11 good (but 9 is first bad)
|
||||
3c77083deb4a
|
||||
429fcd26f52d
|
||||
$ hg bisect --extend
|
||||
Extending search to changeset 8:dab8161ac8fc
|
||||
Extending search to changeset dab8161ac8fc
|
||||
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
||||
$ hg log -q -r 'bisect(untested)'
|
||||
$ hg log -q -r 'bisect(ignored)'
|
||||
|
Loading…
Reference in New Issue
Block a user