Mercurial > hg
comparison tests/hghave @ 14050:9e8a9d45945c stable
subrepo: handle svn tracked/unknown directory collisions
This happens more often than expected. Say you have an svn subrepository with
python code. Python would have generated unknown .pyc files. Now, you rebase
this setup on a revision where a directory containing python code does not
exist. Subversion is first asked to remove this directory when updating, but
will not because it contains untracked items. Then it will have to bring back
the directory after the merge but will fail because it now collides with an
untracked directory.
Using --force is not very elegant and only works with svn >= 1.5 but the only
alternative I can think of is to write our own purge command for subversion.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 04 Mar 2011 14:00:49 +0100 |
parents | c17e4d881722 |
children | 82f0412ef7de |
comparison
equal
deleted
inserted
replaced
14025:1052b1421a48 | 14050:9e8a9d45945c |
---|---|
118 try: | 118 try: |
119 from docutils.core import publish_cmdline | 119 from docutils.core import publish_cmdline |
120 return True | 120 return True |
121 except ImportError: | 121 except ImportError: |
122 return False | 122 return False |
123 | |
124 def getsvnversion(): | |
125 m = matchoutput('svn --version 2>&1', r'^svn,\s+version\s+(\d+)\.(\d+)') | |
126 if not m: | |
127 return (0, 0) | |
128 return (int(m.group(1)), int(m.group(2))) | |
129 | |
130 def has_svn15(): | |
131 return getsvnversion() >= (1, 5) | |
123 | 132 |
124 def has_svn(): | 133 def has_svn(): |
125 return matchoutput('svn --version 2>&1', r'^svn, version') and \ | 134 return matchoutput('svn --version 2>&1', r'^svn, version') and \ |
126 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version') | 135 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version') |
127 | 136 |
202 "outer-repo": (has_outer_repo, "outer repo"), | 211 "outer-repo": (has_outer_repo, "outer repo"), |
203 "p4": (has_p4, "Perforce server and client"), | 212 "p4": (has_p4, "Perforce server and client"), |
204 "pygments": (has_pygments, "Pygments source highlighting library"), | 213 "pygments": (has_pygments, "Pygments source highlighting library"), |
205 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"), | 214 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"), |
206 "svn": (has_svn, "subversion client and admin tools"), | 215 "svn": (has_svn, "subversion client and admin tools"), |
216 "svn15": (has_svn15, "subversion client and admin tools >= 1.5"), | |
207 "svn-bindings": (has_svn_bindings, "subversion python bindings"), | 217 "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
208 "symlink": (has_symlink, "symbolic links"), | 218 "symlink": (has_symlink, "symbolic links"), |
209 "tla": (has_tla, "GNU Arch tla client"), | 219 "tla": (has_tla, "GNU Arch tla client"), |
210 "unix-permissions": (has_unix_permissions, "unix-style permissions"), | 220 "unix-permissions": (has_unix_permissions, "unix-style permissions"), |
211 } | 221 } |