##// END OF EJS Templates
bundlespec: handle the presence of obsmarker part...
marmoute -
r50230:04cdb442 default
parent child Browse files
Show More
@@ -146,6 +146,10 b' def getbundlespec(ui, fh):'
146 splitted = requirements.split()
146 splitted = requirements.split()
147 params = bundle2._formatrequirementsparams(splitted)
147 params = bundle2._formatrequirementsparams(splitted)
148 return b'none-v2;stream=v2;%s' % params
148 return b'none-v2;stream=v2;%s' % params
149 elif part.type == b'obsmarkers':
150 params[b'obsolescence'] = b'yes'
151 if not part.mandatory:
152 params[b'obsolescence-mandatory'] = b'no'
149
153
150 if not version:
154 if not version:
151 raise error.Abort(
155 raise error.Abort(
@@ -1489,6 +1489,8 b' Test bundlespec overwrite default'
1489
1489
1490 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs
1490 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs
1491 1 changesets found
1491 1 changesets found
1492 $ hg debugbundle --spec bundle-type-with-obs
1493 bzip2-v2;obsolescence=yes
1492 $ hg debugbundle bundle-type-with-obs --part-type obsmarkers
1494 $ hg debugbundle bundle-type-with-obs --part-type obsmarkers
1493 Stream params: {Compression: BZ}
1495 Stream params: {Compression: BZ}
1494 obsmarkers -- {} (mandatory: True)
1496 obsmarkers -- {} (mandatory: True)
@@ -1497,6 +1499,8 b' Test bundlespec overwrite default'
1497
1499
1498 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes;obsolescence-mandatory=no' --all --hidden bundle-type-with-obs-adv
1500 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=yes;obsolescence-mandatory=no' --all --hidden bundle-type-with-obs-adv
1499 1 changesets found
1501 1 changesets found
1502 $ hg debugbundle --spec bundle-type-with-obs-adv
1503 bzip2-v2;obsolescence=yes;obsolescence-mandatory=no
1500 $ hg debugbundle bundle-type-with-obs-adv --part-type obsmarkers
1504 $ hg debugbundle bundle-type-with-obs-adv --part-type obsmarkers
1501 Stream params: {Compression: BZ}
1505 Stream params: {Compression: BZ}
1502 obsmarkers -- {} (mandatory: False)
1506 obsmarkers -- {} (mandatory: False)
@@ -1504,6 +1508,8 b' Test bundlespec overwrite default'
1504 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1508 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1505 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs
1509 $ hg bundle -R repo-with-obs --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs
1506 1 changesets found
1510 1 changesets found
1511 $ hg debugbundle --spec bundle-type-without-obs
1512 bzip2-v2
1507 $ hg debugbundle bundle-type-without-obs --part-type obsmarkers
1513 $ hg debugbundle bundle-type-without-obs --part-type obsmarkers
1508 Stream params: {Compression: BZ}
1514 Stream params: {Compression: BZ}
1509
1515
@@ -1512,6 +1518,8 b' Test bundlespec overwrite local config'
1512
1518
1513 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=false --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs2
1519 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=false --type 'v2;obsolescence=yes' --all --hidden bundle-type-with-obs2
1514 1 changesets found
1520 1 changesets found
1521 $ hg debugbundle --spec bundle-type-with-obs2
1522 bzip2-v2;obsolescence=yes
1515 $ hg debugbundle bundle-type-with-obs2 --part-type obsmarkers
1523 $ hg debugbundle bundle-type-with-obs2 --part-type obsmarkers
1516 Stream params: {Compression: BZ}
1524 Stream params: {Compression: BZ}
1517 obsmarkers -- {} (mandatory: True)
1525 obsmarkers -- {} (mandatory: True)
@@ -1519,5 +1527,7 b' Test bundlespec overwrite local config'
1519 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1527 1ea73414a91b0920940797d8fc6a11e447f8ea1e 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1520 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=true --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs2
1528 $ hg bundle -R repo-with-obs --config experimental.evolution.bundle-obsmarker=true --type 'v2;obsolescence=no' --all --hidden bundle-type-without-obs2
1521 1 changesets found
1529 1 changesets found
1530 $ hg debugbundle --spec bundle-type-without-obs2
1531 bzip2-v2
1522 $ hg debugbundle bundle-type-without-obs2 --part-type obsmarkers
1532 $ hg debugbundle bundle-type-without-obs2 --part-type obsmarkers
1523 Stream params: {Compression: BZ}
1533 Stream params: {Compression: BZ}
General Comments 0
You need to be logged in to leave comments. Login now