diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 17:47:43 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-02-20 17:47:43 +0000 |
commit | 8cc0c4d4ee57c3d550bf204c36768f713d4a1668 (patch) | |
tree | d39dbf07ad1d59a24dd161a35e82db4aee67e254 | |
parent | ac9209cd66c85210cf5777540c0c3361a5ca8635 (diff) | |
download | lorry-jannis/bzr-map-trunk-to-master.tar.gz |
Map bzr's trunk branch to master in git rather than refs/heads/trunk.jannis/bzr-map-trunk-to-master
-rwxr-xr-x | lorry | 4 | ||||
-rwxr-xr-x | tests/bzr-single-commit.script | 4 | ||||
-rw-r--r-- | tests/bzr-single-commit.stdout | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -220,7 +220,9 @@ class Lorry(cliapp.Application): branchdir = os.path.join(bzrdir, branch) self.progress('.. fast-exporting branch %s from bzr' % branch) exports[branch] = os.path.join(dirname, 'fast-export' + branch) - cmdline = ['bzr', 'fast-export', '--git-branch=' + branch, branchdir, exports[branch]] + gitbranch = 'master' if branch == 'trunk' else branch + cmdline = ['bzr', 'fast-export', '--git-branch=' + gitbranch, + branchdir, exports[branch]] if os.path.exists(bzrmarks): cmdline.append('--marks=' + bzrmarks) else: diff --git a/tests/bzr-single-commit.script b/tests/bzr-single-commit.script index a870558..c9fb5db 100755 --- a/tests/bzr-single-commit.script +++ b/tests/bzr-single-commit.script @@ -35,8 +35,8 @@ workdir="$DATADIR/work-dir" git show-ref | cut -d' ' -f2 # cat the test file - git cat-file blob trunk:test.txt + git cat-file blob master:test.txt # list the commit messages - git log --pretty='%s' trunk + git log --pretty='%s' master ) diff --git a/tests/bzr-single-commit.stdout b/tests/bzr-single-commit.stdout index 37f9da3..eae50d1 100644 --- a/tests/bzr-single-commit.stdout +++ b/tests/bzr-single-commit.stdout @@ -1,3 +1,3 @@ -refs/heads/trunk +refs/heads/master first line first commit |