Show More
@@ -247,6 +247,10 b' class svn_source(converter_source):' | |||||
247 |
|
247 | |||
248 | def getheads(self): |
|
248 | def getheads(self): | |
249 |
|
249 | |||
|
250 | def isdir(path, revnum): | |||
|
251 | kind = svn.ra.check_path(self.ra, path, revnum) | |||
|
252 | return kind == svn.core.svn_node_dir | |||
|
253 | ||||
250 | def getcfgpath(name, rev): |
|
254 | def getcfgpath(name, rev): | |
251 | cfgpath = self.ui.config('convert', 'svn.' + name) |
|
255 | cfgpath = self.ui.config('convert', 'svn.' + name) | |
252 | if cfgpath is not None and cfgpath.strip() == '': |
|
256 | if cfgpath is not None and cfgpath.strip() == '': | |
@@ -288,6 +292,8 b' class svn_source(converter_source):' | |||||
288 | self.ctx) |
|
292 | self.ctx) | |
289 | for branch in branchnames.keys(): |
|
293 | for branch in branchnames.keys(): | |
290 | module = '%s/%s/%s' % (oldmodule, branches, branch) |
|
294 | module = '%s/%s/%s' % (oldmodule, branches, branch) | |
|
295 | if not isdir(module, self.last_changed): | |||
|
296 | continue | |||
291 | brevid = self.latest(module, self.last_changed) |
|
297 | brevid = self.latest(module, self.last_changed) | |
292 | if not brevid: |
|
298 | if not brevid: | |
293 | self.ui.note(_('ignoring empty branch %s\n') % |
|
299 | self.ui.note(_('ignoring empty branch %s\n') % |
@@ -38,7 +38,9 b' cd A' | |||||
38 | echo hello > trunk/letter.txt |
|
38 | echo hello > trunk/letter.txt | |
39 | echo hey > trunk/letter2.txt |
|
39 | echo hey > trunk/letter2.txt | |
40 | echo ho > trunk/letter3.txt |
|
40 | echo ho > trunk/letter3.txt | |
41 | svn add trunk/letter.txt trunk/letter2.txt trunk/letter3.txt |
|
41 | # Add a file within branches, used to confuse branch detection | |
|
42 | echo a > branches/readme.txt | |||
|
43 | svn add trunk/letter.txt trunk/letter2.txt trunk/letter3.txt branches/readme.txt | |||
42 | svn ci -m hello |
|
44 | svn ci -m hello | |
43 |
|
45 | |||
44 | echo % branch to old letters |
|
46 | echo % branch to old letters |
@@ -12,10 +12,12 b' Checked out revision 1.' | |||||
12 | A trunk/letter.txt |
|
12 | A trunk/letter.txt | |
13 | A trunk/letter2.txt |
|
13 | A trunk/letter2.txt | |
14 | A trunk/letter3.txt |
|
14 | A trunk/letter3.txt | |
|
15 | A branches/readme.txt | |||
|
16 | Adding branches/readme.txt | |||
15 | Adding trunk/letter.txt |
|
17 | Adding trunk/letter.txt | |
16 | Adding trunk/letter2.txt |
|
18 | Adding trunk/letter2.txt | |
17 | Adding trunk/letter3.txt |
|
19 | Adding trunk/letter3.txt | |
18 | Transmitting file data ... |
|
20 | Transmitting file data .... | |
19 | Committed revision 2. |
|
21 | Committed revision 2. | |
20 | % branch to old letters |
|
22 | % branch to old letters | |
21 | A branches/old |
|
23 | A branches/old |
General Comments 0
You need to be logged in to leave comments.
Login now