Mercurial > hg
annotate tests/test-convert-svn-move @ 10014:54cd28258ea7
status: add the --change option to display files changed in a revision
This option is similar to the one already used for the diff command.
Unfortunately, the c and C short option are already used for status, so there
is no corresponding short option. However, there is no short option for --rev
either, so that's consistent.
author | Gilles Moris <gilles.moris@free.fr> |
---|---|
date | Mon, 30 Nov 2009 23:51:06 +0100 |
parents | 5b7da468531b |
children | c52057614c72 |
rev | line source |
---|---|
5955
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 "$TESTDIR/hghave" svn svn-bindings || exit 80 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 fix_path() |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 { |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 tr '\\' / |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 } |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 echo "[extensions]" >> $HGRCPATH |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 echo "convert = " >> $HGRCPATH |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 echo "hgext.graphlog =" >> $HGRCPATH |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 svnadmin create svn-repo |
7475
90d8dfb481e7
Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents:
6851
diff
changeset
|
15 cat "$TESTDIR/svn/move.svndump" | svnadmin load svn-repo > /dev/null |
5955
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 svnpath=`pwd | fix_path` |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 # SVN wants all paths to start with a slash. Unfortunately, |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 # Windows ones don't. Handle that. |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 expr $svnpath : "\/" > /dev/null |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 if [ $? -ne 0 ]; then |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 svnpath='/'$svnpath |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 fi |
7475
90d8dfb481e7
Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents:
6851
diff
changeset
|
24 svnurl=file://$svnpath/svn-repo |
5955
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 echo % convert trunk and branches |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 hg convert --datesort $svnurl/subproject A-hg |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 cd A-hg |
8523
5b7da468531b
tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents:
7475
diff
changeset
|
30 hg glog --template '{rev} {desc|firstline} files: {files}\n' |
5955
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 hg branches | sed 's/:.*/:/' |
c4496b7c10ce
convert: fix svn_source.latest()
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 cd .. |