##// END OF EJS Templates
convert: check svn branches are directories
Patrick Mezard -
r6491:2bdd4324 default
parent child Browse files
Show More
@@ -247,6 +247,10 b' class svn_source(converter_source):'
247 247
248 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 254 def getcfgpath(name, rev):
251 255 cfgpath = self.ui.config('convert', 'svn.' + name)
252 256 if cfgpath is not None and cfgpath.strip() == '':
@@ -288,6 +292,8 b' class svn_source(converter_source):'
288 292 self.ctx)
289 293 for branch in branchnames.keys():
290 294 module = '%s/%s/%s' % (oldmodule, branches, branch)
295 if not isdir(module, self.last_changed):
296 continue
291 297 brevid = self.latest(module, self.last_changed)
292 298 if not brevid:
293 299 self.ui.note(_('ignoring empty branch %s\n') %
@@ -38,7 +38,9 b' cd A'
38 38 echo hello > trunk/letter.txt
39 39 echo hey > trunk/letter2.txt
40 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 44 svn ci -m hello
43 45
44 46 echo % branch to old letters
@@ -12,10 +12,12 b' Checked out revision 1.'
12 12 A trunk/letter.txt
13 13 A trunk/letter2.txt
14 14 A trunk/letter3.txt
15 A branches/readme.txt
16 Adding branches/readme.txt
15 17 Adding trunk/letter.txt
16 18 Adding trunk/letter2.txt
17 19 Adding trunk/letter3.txt
18 Transmitting file data ...
20 Transmitting file data ....
19 21 Committed revision 2.
20 22 % branch to old letters
21 23 A branches/old
General Comments 0
You need to be logged in to leave comments. Login now