[Updated] D12141: rank: add minimal test

pacien (Pacien) phabricator at mercurial-scm.org
Tue Feb 15 14:48:46 UTC 2022


Closed by commit rHG3984e7d4b9fd: rank: add minimal test (authored by pacien).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12141?vs=32169&id=32202

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12141/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D12141

AFFECTED FILES
  tests/test-rank.t

CHANGE DETAILS

diff --git a/tests/test-rank.t b/tests/test-rank.t
new file mode 100644
--- /dev/null
+++ b/tests/test-rank.t
@@ -0,0 +1,38 @@
+=============================================================
+Check that we can compute and exchange revision rank properly
+=============================================================
+
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > exp-use-changelog-v2=enable-unstable-format-and-corrupt-my-data
+  > EOF
+
+
+Test minimal rank computation with merge
+
+  $ hg init rank-repo-minimal
+  $ cd rank-repo-minimal
+  $ touch 0
+  $ hg commit -Aqm 0
+  $ touch 1
+  $ hg commit -Aqm 1
+  $ hg update -qr 0
+  $ touch 2
+  $ hg commit -Aqm 2
+  $ hg merge -qr 1
+  $ hg commit -m 3
+  $ touch 4
+  $ hg commit -Aqm 4
+  $ hg log --graph --template '{rev} {_fast_rank}\n'
+  @  4 5
+  |
+  o    3 4
+  |\
+  | o  2 2
+  | |
+  o |  1 2
+  |/
+  o  0 1
+  
+  $ cd ..
+



To: pacien, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220215/4ed85901/attachment-0002.html>


More information about the Mercurial-patches mailing list