Mercurial > hgsubversion
comparison tests/test_util.py @ 1092:cd0d14e25757
layouts: add custom layout for those of us that need weird mappings
This adds a config-driven custom layout, targeted at the case where
you need to fetch a small subset of a large number of subversion
branches, or where your subversion layout doesn't match the standard
trunk/branches/tags layout very well.
| author | David Schleimer <dschleimer@fb.com> |
|---|---|
| date | Mon, 26 Aug 2013 16:40:31 -0700 |
| parents | ca36d5915dc7 |
| children | 4a92eb1484ba |
comparison
equal
deleted
inserted
replaced
| 1091:384eb7e05b61 | 1092:cd0d14e25757 |
|---|---|
| 104 'project_name_with_space.svndump': '/project name', | 104 'project_name_with_space.svndump': '/project name', |
| 105 'non_ascii_path_1.svndump': '/b\xC3\xB8b', | 105 'non_ascii_path_1.svndump': '/b\xC3\xB8b', |
| 106 'non_ascii_path_2.svndump': '/b%C3%B8b', | 106 'non_ascii_path_2.svndump': '/b%C3%B8b', |
| 107 'subdir_is_file_prefix.svndump': '/flaf', | 107 'subdir_is_file_prefix.svndump': '/flaf', |
| 108 } | 108 } |
| 109 # map defining the layouts of the fixtures we can use with custom layout | |
| 110 # these are really popular layouts, so I gave them names | |
| 111 trunk_only = { | |
| 112 'default': 'trunk', | |
| 113 } | |
| 114 trunk_dev_branch = { | |
| 115 'default': 'trunk', | |
| 116 'dev_branch': 'branches/dev_branch', | |
| 117 } | |
| 118 custom = { | |
| 119 'addspecial.svndump': { | |
| 120 'default': 'trunk', | |
| 121 'foo': 'branches/foo', | |
| 122 }, | |
| 123 'binaryfiles.svndump': trunk_only, | |
| 124 'branch_create_with_dir_delete.svndump': trunk_dev_branch, | |
| 125 'branch_delete_parent_dir.svndump': trunk_dev_branch, | |
| 126 'branchmap.svndump': { | |
| 127 'default': 'trunk', | |
| 128 'badname': 'branches/badname', | |
| 129 'feature': 'branches/feature', | |
| 130 }, | |
| 131 'branch_prop_edit.svndump': trunk_dev_branch, | |
| 132 'branch_rename_to_trunk.svndump': { | |
| 133 'default': 'trunk', | |
| 134 'dev_branch': 'branches/dev_branch', | |
| 135 'old_trunk': 'branches/old_trunk', | |
| 136 }, | |
| 137 'copies.svndump': trunk_only, | |
| 138 'copybeforeclose.svndump': { | |
| 139 'default': 'trunk', | |
| 140 'test': 'branches/test' | |
| 141 }, | |
| 142 'delentries.svndump': trunk_only, | |
| 143 'delete_restore_trunk.svndump': trunk_only, | |
| 144 'empty_dir_in_trunk_not_repo_root.svndump': trunk_only, | |
| 145 'executebit.svndump': trunk_only, | |
| 146 'filecase.svndump': trunk_only, | |
| 147 'file_not_in_trunk_root.svndump': trunk_only, | |
| 148 'project_name_with_space.svndump': trunk_dev_branch, | |
| 149 'pushrenames.svndump': trunk_only, | |
| 150 'rename_branch_parent_dir.svndump': trunk_dev_branch, | |
| 151 'renamedproject.svndump': { | |
| 152 'default': 'trunk', | |
| 153 'branch': 'branches/branch', | |
| 154 }, | |
| 155 'renames.svndump': { | |
| 156 'default': 'trunk', | |
| 157 'branch1': 'branches/branch1', | |
| 158 }, | |
| 159 'replace_branch_with_branch.svndump': { | |
| 160 'default': 'trunk', | |
| 161 'branch1': 'branches/branch1', | |
| 162 'branch2': 'branches/branch2', | |
| 163 }, | |
| 164 'replace_trunk_with_branch.svndump': { | |
| 165 'default': 'trunk', | |
| 166 'test': 'branches/test', | |
| 167 }, | |
| 168 'revert.svndump': trunk_only, | |
| 169 'siblingbranchfix.svndump': { | |
| 170 'default': 'trunk', | |
| 171 'wrongbranch': 'branches/wrongbranch', | |
| 172 }, | |
| 173 'simple_branch.svndump': { | |
| 174 'default': 'trunk', | |
| 175 'the_branch': 'branches/the_branch', | |
| 176 }, | |
| 177 'spaces-in-path.svndump': trunk_dev_branch, | |
| 178 'symlinks.svndump': trunk_only, | |
| 179 'truncatedhistory.svndump': trunk_only, | |
| 180 'unorderedbranch.svndump': { | |
| 181 'default': 'trunk', | |
| 182 'branch': 'branches/branch', | |
| 183 }, | |
| 184 'unrelatedbranch.svndump': { | |
| 185 'default': 'trunk', | |
| 186 'branch1': 'branches/branch1', | |
| 187 'branch2': 'branches/branch2', | |
| 188 }, | |
| 189 } | |
| 109 | 190 |
| 110 FIXTURES = os.path.join(os.path.abspath(os.path.dirname(__file__)), | 191 FIXTURES = os.path.join(os.path.abspath(os.path.dirname(__file__)), |
| 111 'fixtures') | 192 'fixtures') |
| 112 | 193 |
| 113 def getlocalpeer(repo): | 194 def getlocalpeer(repo): |
