annotate tests/fixtures/rename-closed-branch-dir.sh @ 1512:6d0fe7ce9898

commands: fix command option registering A recent patch introduced svnopts as a way of sharing the svn command options between the old and the new way of registering a command. It turns out 'svnopts' was already used further up in the module to define the flags that should be added to *all* Mercurial commands. So our definition of it here cause us to add all of these options to all Mercurial commands. This was caught because it changes --rev to be '' instead of [], which breaks a number of assumptions in the other commands. Given that none of the subversion tests are command line tests, I'm not sure how to test this. It was caught in other extensions tests. (grafted from 3b1334407783a4379fd515e2ed9acc61e3f175ff) (grafted from 6db63ead5556f2bf72e423ca8c6df08ea3a5b009)
author Durham Goode <durham@fb.com>
date Wed, 24 May 2017 15:07:00 -0700
parents b072dc02d1e3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1373
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
1 #!/bin/sh
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
2 #
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
3 # Generate rename-closed-branch-dir.svndump
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
4 #
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
5
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
6 mkdir temp
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
7 cd temp
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
8
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
9 mkdir project
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
10 cd project
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
11 mkdir trunk
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
12 mkdir branches
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
13 mkdir tags
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
14 cd ..
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
15
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
16 svnadmin create testrepo
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
17 CURRENT_DIR=`pwd`
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
18 svnurl=file://"$CURRENT_DIR"/testrepo
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
19 #svn import project-orig $svnurl -m "init project"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
20
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
21 svn co $svnurl project
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
22 cd project
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
23 svn add *
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
24 svn ci -m "init project"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
25
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
26 cd trunk
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
27 echo a > a.txt
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
28 svn add a.txt
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
29 svn ci -m "add a.txt in trunk"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
30
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
31 # Create a branch
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
32 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
33 cd ../branches
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
34 svn copy ../trunk async-db
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
35 svn ci -m "add branch async-db"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
36 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
37
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
38 # Implement feature
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
39 cd async-db
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
40 echo b > b.txt
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
41 svn add b.txt
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
42 svn ci -m "Async functionality"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
43
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
44 # Merge feature branch
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
45 cd ../../trunk
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
46 svn merge $svnurl/branches/async-db
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
47 svn ci -m "Merged branch async-db"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
48 cd ..
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
49 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
50
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
51 # Create branch folder for unnecessary branches
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
52 svn mkdir $svnurl/branches/dead -m "Create branch folder for unnecessary branches"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
53 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
54
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
55 # We don't need the 'async-db' branch, anymore.
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
56 svn copy $svnurl/branches/async-db $svnurl/branches/dead -m "We don't need the 'async-db' branch, anymore."
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
57 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
58
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
59 # Rename 'dead' folder to 'closed'
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
60 svn move $svnurl/branches/dead $svnurl/branches/closed -m "Renamed 'dead' folder to 'closed'"
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
61 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
62
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
63 # Move 'branches/closed' to 'tags/closed'
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
64 svn move $svnurl/branches/closed $svnurl/tags/closed -m "Moved 'branches/closed' to 'tags/closed'."
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
65 svn up
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
66
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
67 # Dump repository
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
68 cd ..
b072dc02d1e3 rename-closed-branch-dir: add a fixture that renames a directory of closed branches
Augie Fackler <raf@durin42.com>
parents:
diff changeset
69 svnadmin dump testrepo > ../rename-closed-branch-dir.svndump