tests/test-convert-datesort.t
author Augie Fackler <durin42@gmail.com>
Mon, 25 Jul 2011 16:04:40 -0500
changeset 14968 b7dbe957585c
parent 12528 f6b206417ba4
child 15615 41885892796e
permissions -rw-r--r--
util: use safehasattr or getattr instead of hasattr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6100
49c69e1e4aa2 convert: fix --datesort ordering
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
12528
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     3
  > [extensions]
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     4
  > convert=
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     5
  > graphlog=
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     6
  > EOF
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     7
  $ hg init t
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     8
  $ cd t
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
     9
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    10
  $ hg ci -Am a0 -d '1 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    11
  adding a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    12
  $ hg branch brancha
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    13
  marked working directory as branch brancha
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    14
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    15
  $ hg ci -m a1 -d '2 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    16
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    17
  $ hg ci -m a2 -d '3 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    18
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    19
  $ hg ci -m a3 -d '4 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    20
  $ hg up -C 0
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    21
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    22
  $ hg branch branchb
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    23
  marked working directory as branch branchb
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    24
  $ echo b >> b
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    25
  $ hg ci -Am b0 -d '6 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    26
  adding b
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    27
  $ hg up -C brancha
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    28
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    29
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    30
  $ hg ci -m a4 -d '5 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    31
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    32
  $ hg ci -m a5 -d '7 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    33
  $ echo a >> a
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    34
  $ hg ci -m a6 -d '8 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    35
  $ hg up -C branchb
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    36
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    37
  $ echo b >> b
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    38
  $ hg ci -m b1 -d '9 0'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    39
  $ cd ..
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    40
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    41
convert with datesort
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    42
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    43
  $ hg convert --datesort t t-datesort
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    44
  initializing destination t-datesort repository
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    45
  scanning source...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    46
  sorting...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    47
  converting...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    48
  8 a0
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    49
  7 a1
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    50
  6 a2
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    51
  5 a3
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    52
  4 a4
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    53
  3 b0
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    54
  2 a5
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    55
  1 a6
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    56
  0 b1
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    57
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    58
graph converted repo
6100
49c69e1e4aa2 convert: fix --datesort ordering
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    59
12528
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    60
  $ hg -R t-datesort glog --template '{rev} "{desc}"\n'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    61
  o  8 "b1"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    62
  |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    63
  | o  7 "a6"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    64
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    65
  | o  6 "a5"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    66
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    67
  o |  5 "b0"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    68
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    69
  | o  4 "a4"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    70
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    71
  | o  3 "a3"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    72
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    73
  | o  2 "a2"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    74
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    75
  | o  1 "a1"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    76
  |/
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    77
  o  0 "a0"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    78
  
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    79
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    80
convert with datesort (default mode)
6100
49c69e1e4aa2 convert: fix --datesort ordering
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    81
12528
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    82
  $ hg convert t t-sourcesort
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    83
  initializing destination t-sourcesort repository
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    84
  scanning source...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    85
  sorting...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    86
  converting...
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    87
  8 a0
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    88
  7 a1
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    89
  6 a2
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    90
  5 a3
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    91
  4 b0
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    92
  3 a4
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    93
  2 a5
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    94
  1 a6
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    95
  0 b1
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    96
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    97
graph converted repo
6100
49c69e1e4aa2 convert: fix --datesort ordering
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    98
12528
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
    99
  $ hg -R t-sourcesort glog --template '{rev} "{desc}"\n'
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   100
  o  8 "b1"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   101
  |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   102
  | o  7 "a6"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   103
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   104
  | o  6 "a5"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   105
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   106
  | o  5 "a4"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   107
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   108
  o |  4 "b0"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   109
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   110
  | o  3 "a3"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   111
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   112
  | o  2 "a2"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   113
  | |
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   114
  | o  1 "a1"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   115
  |/
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   116
  o  0 "a0"
f6b206417ba4 tests: unify test-convert-datesort
Matt Mackall <mpm@selenic.com>
parents: 8692
diff changeset
   117