tests/test-convert-bzr-directories.t
author Manuel Jacob <me@manueljacob.de>
Sun, 28 Jun 2020 17:52:29 +0200
changeset 45018 f2dc337117b9
parent 44302 815e9ca1078c
child 47377 26127236b229
permissions -rw-r--r--
compat: back out a25343d16ebe (initialize LC_CTYPE locale on all Python ...) As Yuya Nishihara pointed out, setting LC_CTYPE changes the behavior of some str methods on Python 2.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26066
89872688893f tests: move '#require bzr' into .t files
Gregory Szorc <gregory.szorc@gmail.com>
parents: 15487
diff changeset
     1
#require bzr
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     2
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
     3
  $ . "$TESTDIR/bzr-definitions"
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
     4
44302
815e9ca1078c tests: add workaround for bzr bug
Martin von Zweigbergk <martinvonz@google.com>
parents: 26066
diff changeset
     5
Work around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944379
815e9ca1078c tests: add workaround for bzr bug
Martin von Zweigbergk <martinvonz@google.com>
parents: 26066
diff changeset
     6
  $ mkdir -p "${HOME}/.config/breezy"
815e9ca1078c tests: add workaround for bzr bug
Martin von Zweigbergk <martinvonz@google.com>
parents: 26066
diff changeset
     7
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
     8
empty directory
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
     9
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    10
  $ mkdir test-empty
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    11
  $ cd test-empty
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    12
  $ bzr init -q source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    13
  $ cd source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    14
  $ echo content > a
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    15
  $ bzr add -q a
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    16
  $ bzr commit -q -m 'Initial add'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    17
  $ mkdir empty
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    18
  $ bzr add -q empty
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    19
  $ bzr commit -q -m 'Empty directory added'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    20
  $ echo content > empty/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    21
  $ bzr add -q empty/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    22
  $ bzr commit -q -m 'Added file into directory'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    23
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    24
  $ hg convert source source-hg
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    25
  initializing destination source-hg repository
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    26
  scanning source...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    27
  sorting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    28
  converting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    29
  2 Initial add
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    30
  1 Empty directory added
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    31
  0 Added file into directory
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    32
  $ manifest source-hg 1
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    33
  % manifest of 1
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    34
  644   a
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    35
  $ manifest source-hg tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    36
  % manifest of tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    37
  644   a
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    38
  644   empty/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    39
  $ cd ..
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    40
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    41
directory renames
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    42
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    43
  $ mkdir test-dir-rename
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    44
  $ cd test-dir-rename
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    45
  $ bzr init -q source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    46
  $ cd source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    47
  $ mkdir tpyo
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    48
  $ echo content > tpyo/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    49
  $ bzr add -q tpyo
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    50
  $ bzr commit -q -m 'Added directory'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    51
  $ bzr mv tpyo typo
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    52
  tpyo => typo
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    53
  $ bzr commit -q -m 'Oops, typo'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    54
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    55
  $ hg convert source source-hg
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    56
  initializing destination source-hg repository
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    57
  scanning source...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    58
  sorting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    59
  converting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    60
  1 Added directory
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    61
  0 Oops, typo
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    62
  $ manifest source-hg 0
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    63
  % manifest of 0
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    64
  644   tpyo/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    65
  $ manifest source-hg tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    66
  % manifest of tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    67
  644   typo/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    68
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    69
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    70
nested directory renames
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    71
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    72
  $ mkdir test-nested-dir-rename
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    73
  $ cd test-nested-dir-rename
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    74
  $ bzr init -q source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    75
  $ cd source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    76
  $ mkdir -p firstlevel/secondlevel/thirdlevel
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    77
  $ echo content > firstlevel/secondlevel/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    78
  $ echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    79
  $ bzr add -q firstlevel
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    80
  $ bzr commit -q -m 'Added nested directories'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    81
  $ bzr mv firstlevel/secondlevel secondlevel
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    82
  firstlevel/secondlevel => secondlevel
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    83
  $ bzr commit -q -m 'Moved secondlevel one level up'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    84
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    85
  $ hg convert source source-hg
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    86
  initializing destination source-hg repository
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    87
  scanning source...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    88
  sorting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    89
  converting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    90
  1 Added nested directories
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    91
  0 Moved secondlevel one level up
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    92
  $ manifest source-hg tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    93
  % manifest of tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    94
  644   secondlevel/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    95
  644   secondlevel/thirdlevel/stuff
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    96
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    97
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
    98
directory remove
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
    99
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   100
  $ mkdir test-dir-remove
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   101
  $ cd test-dir-remove
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   102
  $ bzr init -q source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   103
  $ cd source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   104
  $ mkdir src
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   105
  $ echo content > src/sourcecode
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   106
  $ bzr add -q src
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   107
  $ bzr commit -q -m 'Added directory'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   108
  $ bzr rm -q src
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   109
  $ bzr commit -q -m 'Removed directory'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   110
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   111
  $ hg convert source source-hg
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   112
  initializing destination source-hg repository
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   113
  scanning source...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   114
  sorting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   115
  converting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   116
  1 Added directory
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   117
  0 Removed directory
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   118
  $ manifest source-hg 0
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   119
  % manifest of 0
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   120
  644   src/sourcecode
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   121
  $ manifest source-hg tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   122
  % manifest of tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   123
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   124
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   125
directory replace
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
   126
12514
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   127
  $ mkdir test-dir-replace
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   128
  $ cd test-dir-replace
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   129
  $ bzr init -q source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   130
  $ cd source
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   131
  $ mkdir first second
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   132
  $ echo content > first/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   133
  $ echo morecontent > first/dummy
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   134
  $ echo othercontent > second/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   135
  $ bzr add -q first second
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   136
  $ bzr commit -q -m 'Initial layout'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   137
  $ bzr mv first/file second/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   138
  first/file => second/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   139
  $ bzr mv first third
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   140
  first => third
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   141
  $ bzr commit -q -m 'Some conflicting moves'
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   142
  $ cd ..
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   143
  $ hg convert source source-hg
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   144
  initializing destination source-hg repository
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   145
  scanning source...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   146
  sorting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   147
  converting...
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   148
  1 Initial layout
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   149
  0 Some conflicting moves
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   150
  $ manifest source-hg tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   151
  % manifest of tip
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   152
  644   second/file
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   153
  644   second/something
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   154
  644   third/dummy
c40b4744071a tests: unify test-convert-bzr-directories
Matt Mackall <mpm@selenic.com>
parents: 7058
diff changeset
   155
  $ cd ..
15461
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   156
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   157
divergent nested renames (issue3089)
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   158
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   159
  $ mkdir test-divergent-renames
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   160
  $ cd test-divergent-renames
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   161
  $ bzr init -q source
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   162
  $ cd source
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   163
  $ mkdir -p a/c
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   164
  $ echo a > a/fa
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   165
  $ echo c > a/c/fc
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   166
  $ bzr add -q a
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   167
  $ bzr commit -q -m 'Initial layout'
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   168
  $ bzr mv a b
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   169
  a => b
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   170
  $ mkdir a
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   171
  $ bzr add a
15487
3c72117a7a0e convert/bzr: fix test of divergent nested renames for bzr 1.x
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15461
diff changeset
   172
  add(ed|ing) a (re)
15461
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   173
  $ bzr mv b/c a/c
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   174
  b/c => a/c
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   175
  $ bzr status
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   176
  added:
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   177
    a/
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   178
  renamed:
15487
3c72117a7a0e convert/bzr: fix test of divergent nested renames for bzr 1.x
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15461
diff changeset
   179
    a/? => b/? (re)
3c72117a7a0e convert/bzr: fix test of divergent nested renames for bzr 1.x
Thomas Arendsen Hein <thomas@intevation.de>
parents: 15461
diff changeset
   180
    a/c/? => a/c/? (re)
15461
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   181
  $ bzr commit -q -m 'Divergent renames'
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   182
  $ cd ..
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   183
  $ hg convert source source-hg
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   184
  initializing destination source-hg repository
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   185
  scanning source...
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   186
  sorting...
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   187
  converting...
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   188
  1 Initial layout
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   189
  0 Divergent renames
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   190
  $ hg -R source-hg st -C --change 1
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   191
  A b/fa
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   192
    a/fa
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   193
  R a/fa
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   194
  $ hg -R source-hg manifest -r 1
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   195
  a/c/fc
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   196
  b/fa
6ba2fc0a87ab convert/bzr: correctly handle divergent nested renames (issue3089)
Patrick Mezard <pmezard@gmail.com>
parents: 12514
diff changeset
   197
  $ cd ..