tests/test-rebase-partial.t
author Gregory Szorc <gregory.szorc@gmail.com>
Tue, 20 Jun 2017 20:53:29 -0700
changeset 32992 816a4fa7d5f8
parent 32272 78496ac30025
child 33773 6c1a9fd8361b
permissions -rw-r--r--
hgweb: use separate CSS class for navigation links in footer 2d93d2159e30 changed the styling of the "page_nav" CSS class to use flexbox to separate elements within the <div>. I didn't realize that this class was used outside of the links in the header. So this resulted in incorrectly formatting links in the footer of various pages. Fix that by introducing a new CSS class that preserves the old CSS behavior.

Tests rebasing with part of the rebase set already in the
destination (issue5422)

  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > rebase=
  > drawdag=$TESTDIR/drawdag.py
  > 
  > [experimental]
  > evolution=createmarkers,allowunstable
  > 
  > [alias]
  > tglog = log -G --template "{rev}: {desc}"
  > EOF

  $ rebasewithdag() {
  >   N=`$PYTHON -c "print($N+1)"`
  >   hg init repo$N && cd repo$N
  >   hg debugdrawdag
  >   hg rebase "$@" > _rebasetmp
  >   r=$?
  >   grep -v 'saved backup bundle' _rebasetmp
  >   [ $r -eq 0 ] && hg tglog
  >   cd ..
  >   return $r
  > }

Rebase two commits, of which one is already in the right place

  $ rebasewithdag -r C+D -d B <<EOF
  > C
  > |
  > B D
  > |/
  > A
  > EOF
  rebasing 2:b18e25de2cf5 "D" (D)
  already rebased 3:26805aba1e60 "C" (C tip)
  o  4: D
  |
  | o  3: C
  |/
  | x  2: D
  | |
  o |  1: B
  |/
  o  0: A
  
Can collapse commits even if one is already in the right place

  $ rebasewithdag --collapse -r C+D -d B <<EOF
  > C
  > |
  > B D
  > |/
  > A
  > EOF
  rebasing 2:b18e25de2cf5 "D" (D)
  rebasing 3:26805aba1e60 "C" (C tip)
  o  4: Collapsed revision
  |  * D
  |  * C
  | x  3: C
  |/
  | x  2: D
  | |
  o |  1: B
  |/
  o  0: A
  
Rebase with "holes". The commits after the hole should end up on the parent of
the hole (B below), not on top of the destination (A).

  $ rebasewithdag -r B+D -d A <<EOF
  > D
  > |
  > C
  > |
  > B
  > |
  > A
  > EOF
  already rebased 1:112478962961 "B" (B)
  not rebasing ignored 2:26805aba1e60 "C" (C)
  rebasing 3:f585351a92f8 "D" (D tip)
  o  4: D
  |
  | x  3: D
  | |
  | o  2: C
  |/
  o  1: B
  |
  o  0: A