##// END OF EJS Templates
mercurial: compatability changes for mercurial 4.6.0 release
marcink -
r2735:a8937381 default
parent child Browse files
Show More
@@ -56,7 +56,7 b' class MercurialCommit(base.BaseCommit):'
56 56 self._remote = repository._remote
57 57
58 58 self.raw_id = raw_id
59 self.idx = repository._sanitize_commit_idx(idx)
59 self.idx = idx
60 60
61 61 self._set_bulk_properties(pre_load)
62 62
@@ -395,14 +395,6 b' class MercurialRepository(BaseRepository'
395 395 else:
396 396 return os.stat(st_path).st_mtime
397 397
398 def _sanitize_commit_idx(self, idx):
399 # Note: Mercurial has ``int(-1)`` reserved as not existing id_or_idx
400 # number. A `long` is treated in the correct way though. So we convert
401 # `int` to `long` here to make sure it is handled correctly.
402 if isinstance(idx, int):
403 return long(idx)
404 return idx
405
406 398 def _get_url(self, url):
407 399 """
408 400 Returns normalized url. If schema is not given, would fall
@@ -437,7 +429,6 b' class MercurialRepository(BaseRepository'
437 429 pass
438 430 elif commit_idx is not None:
439 431 self._validate_commit_idx(commit_idx)
440 commit_idx = self._sanitize_commit_idx(commit_idx)
441 432 try:
442 433 id_ = self.commit_ids[commit_idx]
443 434 if commit_idx < 0:
@@ -449,10 +440,6 b' class MercurialRepository(BaseRepository'
449 440 else:
450 441 commit_id = "tip"
451 442
452 # TODO Paris: Ugly hack to "serialize" long for msgpack
453 if isinstance(commit_id, long):
454 commit_id = float(commit_id)
455
456 443 if isinstance(commit_id, unicode):
457 444 commit_id = safe_str(commit_id)
458 445
General Comments 0
You need to be logged in to leave comments. Login now