tests/test-rebase-keep-branch.t
author Matt Mackall <mpm@selenic.com>
Mon, 15 Nov 2010 17:04:55 -0600
branchstable
changeset 13000 417f3c27983b
parent 12640 6cc4b14fb76b
permissions -rw-r--r--
commit: search both parents for missing copy revision (issue2484) raise a proper abort if we can't find an ancestor
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     2
  > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     3
  > graphlog=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     4
  > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     5
  > 
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     6
  > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     7
  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
     8
  > EOF
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
     9
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    10
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    11
  $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    12
  $ cd a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    13
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    14
  $ echo c1 > c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    15
  $ hg ci -Am c1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    16
  adding c1
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    17
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    18
  $ echo c2 > c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    19
  $ hg ci -Am c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    20
  adding c2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    21
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    22
  $ echo l1 > l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    23
  $ hg ci -Am l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    24
  adding l1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    25
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    26
  $ echo l2 > l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    27
  $ hg ci -Am l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    28
  adding l2
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    29
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    30
  $ hg up -q -C 1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    31
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    32
  $ hg branch 'notdefault'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    33
  marked working directory as branch notdefault
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    34
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    35
  $ echo r1 > r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    36
  $ hg ci -Am r1
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    37
  adding r1
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    38
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    39
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    40
  @  4: 'r1' notdefault
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    41
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    42
  | o  3: 'l2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    43
  | |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    44
  | o  2: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    45
  |/
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    46
  o  1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    47
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    48
  o  0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    49
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    50
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    51
Rebase a branch while preserving the branch name:
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    52
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    53
  $ hg up -q -C 3
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    54
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    55
  $ hg rebase -b 4 -d 3 --keepbranches
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
    56
  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
7468
3e5db4228f8f rebase: add support to keep branch names
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
    57
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    58
  $ hg tglog
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    59
  @  4: 'r1' notdefault
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    60
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    61
  o  3: 'l2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    62
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    63
  o  2: 'l1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    64
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    65
  o  1: 'c2'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    66
  |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    67
  o  0: 'c1'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    68
  
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    69
  $ hg branch
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    70
  notdefault
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11198
diff changeset
    71