tests/test-convert-svn-tags.t
author Yuya Nishihara <yuya@tcha.org>
Thu, 24 Mar 2016 22:55:56 +0900
branchstable
changeset 29000 2d3837a4bded
parent 22046 7a9cbb315d84
permissions -rw-r--r--
log: fix status template to list copy source per dest (issue5155) Before, copied files were assumed as "A" (added) and listed followed by non-copy added files. This could double entries of a copy if it had "M" (modified) state. So, this patch makes the template check if a file is included in copies dict. This way, entries should never be doubled. The output of "log -Tstatus -C" does not always agree with "status -C --change" due to the bug of "status", which is documented in test-status.t. See also 2963d5c9d90b.

#require svn svn-bindings

  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > convert =
  > EOF

  $ svnadmin create svn-repo
  $ svnadmin load -q svn-repo < "$TESTDIR/svn/tags.svndump"

Convert
  $ hg convert --datesort svn-repo A-hg
  initializing destination A-hg repository
  scanning source...
  sorting...
  converting...
  5 init projA
  4 adda
  3 changea
  2 changea2
  1 changea3
  0 changea
  updating tags

  $ cd A-hg
  $ hg log -G --template '{rev} {desc|firstline} tags: {tags}\n'
  o  6 update tags tags: tip
  |
  o  5 changea tags: trunk.goodtag
  |
  o  4 changea3 tags:
  |
  o  3 changea2 tags: trunk.v1
  |
  o  2 changea tags:
  |
  o  1 adda tags:
  |
  o  0 init projA tags:
  

  $ hg tags -q
  tip
  trunk.goodtag
  trunk.v1

  $ cd ..

Convert without tags

  $ hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg
  initializing destination A-notags-hg repository
  scanning source...
  sorting...
  converting...
  5 init projA
  4 adda
  3 changea
  2 changea2
  1 changea3
  0 changea

  $ hg -R A-notags-hg tags -q
  tip