Mercurial > hgsubversion
comparison hgsubversion/replay.py @ 499:1fd3cfa47c5e
Support for single-directory clones.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 16 Oct 2009 23:33:41 -0400 |
parents | 990e07054f29 |
children | ef288fb7f2fe |
comparison
equal
deleted
inserted
replaced
498:990e07054f29 | 499:1fd3cfa47c5e |
---|---|
27 svn.get_replay(r.revnum, editor) | 27 svn.get_replay(r.revnum, editor) |
28 current = editor.current | 28 current = editor.current |
29 current.findmissing(svn) | 29 current.findmissing(svn) |
30 | 30 |
31 # update externals | 31 # update externals |
32 | 32 # TODO fix and re-enable externals for single-directory clones |
33 if current.externals: | 33 if current.externals and not meta.layout == 'single': |
34 | 34 |
35 # accumulate externals records for all branches | 35 # accumulate externals records for all branches |
36 revnum = current.rev.revnum | 36 revnum = current.rev.revnum |
37 branches = {} | 37 branches = {} |
38 for path, entry in current.externals.iteritems(): | 38 for path, entry in current.externals.iteritems(): |
39 | |
40 if not meta.is_path_valid(path): | 39 if not meta.is_path_valid(path): |
41 ui.warn('WARNING: Invalid path %s in externals\n' % path) | 40 ui.warn('WARNING: Invalid path %s in externals\n' % path) |
42 continue | 41 continue |
43 | 42 |
44 p, b, bp = meta.split_branch_path(path) | 43 p, b, bp = meta.split_branch_path(path) |
54 | 53 |
55 external[p] = entry | 54 external[p] = entry |
56 | 55 |
57 # register externals file changes | 56 # register externals file changes |
58 for bp, external in branches.iteritems(): | 57 for bp, external in branches.iteritems(): |
59 path = bp + '/.hgsvnexternals' | 58 if bp and bp[-1] != '/': |
59 bp += '/' | |
60 path = (bp and bp + '.hgsvnexternals') or '.hgsvnexternals' | |
60 if external: | 61 if external: |
61 current.set(path, external.write(), False, False) | 62 current.set(path, external.write(), False, False) |
62 else: | 63 else: |
63 current.delete(path) | 64 current.delete(path) |
64 | 65 |