summaryrefslogtreecommitdiff
path: root/tests/test-convert-bzr-ghosts.t
blob: ef9cd96101a2389d01375042876ae5cfb9fa40d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

  $ . "$TESTDIR/bzr-definitions"
  $ cat > ghostcreator.py <<EOF
  > import sys
  > from bzrlib import workingtree
  > wt = workingtree.WorkingTree.open('.')
  > 
  > message, ghostrev = sys.argv[1:]
  > wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
  > wt.commit(message)
  > EOF

ghost revisions

  $ mkdir test-ghost-revisions
  $ cd test-ghost-revisions
  $ bzr init -q source
  $ cd source
  $ echo content > somefile
  $ bzr add -q somefile
  $ bzr commit -q -m 'Initial layout setup'
  $ echo morecontent >> somefile
  $ python ../../ghostcreator.py 'Commit with ghost revision' ghostrev
  $ cd ..
  $ hg convert source source-hg
  initializing destination source-hg repository
  scanning source...
  sorting...
  converting...
  1 Initial layout setup
  0 Commit with ghost revision
  $ glog -R source-hg
  o  1@source "Commit with ghost revision" files: somefile
  |
  o  0@source "Initial layout setup" files: somefile
  

  $ cd ..