##// END OF EJS Templates
convert: ignore blank lines in mapfiles (issue3286)
Patrick Mezard -
r16190:9479c28a stable
parent child Browse files
Show More
@@ -385,8 +385,12 b' class mapfile(dict):'
385 385 raise
386 386 return
387 387 for i, line in enumerate(fp):
388 line = line.splitlines()[0].rstrip()
389 if not line:
390 # Ignore blank lines
391 continue
388 392 try:
389 key, value = line.splitlines()[0].rstrip().rsplit(' ', 1)
393 key, value = line.rsplit(' ', 1)
390 394 except ValueError:
391 395 raise util.Abort(
392 396 _('syntax error in %s(%d): key/value pair expected')
@@ -418,8 +422,12 b' def parsesplicemap(path):'
418 422 try:
419 423 fp = open(path, 'r')
420 424 for i, line in enumerate(fp):
425 line = line.splitlines()[0].rstrip()
426 if not line:
427 # Ignore blank lines
428 continue
421 429 try:
422 child, parents = line.splitlines()[0].rstrip().split(' ', 1)
430 child, parents = line.split(' ', 1)
423 431 parents = parents.replace(',', ' ').split()
424 432 except ValueError:
425 433 raise util.Abort(_('syntax error in %s(%d): child parent1'
@@ -67,10 +67,12 b' splice repo2 on repo1'
67 67 $ cat > splicemap <<EOF
68 68 > $CHILDID1 $PARENTID1
69 69 > $CHILDID2 $PARENTID2,$CHILDID1
70 >
70 71 > EOF
71 72 $ cat splicemap
72 73 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e
73 74 e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db
75
74 76 $ hg clone repo1 target1
75 77 updating to branch default
76 78 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -14,6 +14,8 b' Convert trunk and branches'
14 14
15 15 $ cat > branchmap <<EOF
16 16 > old3 newbranch
17 >
18 >
17 19 > EOF
18 20 $ hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg
19 21 initializing destination A-hg repository
General Comments 0
You need to be logged in to leave comments. Login now