mirror of
https://github.com/facebook/sapling.git
synced 2024-10-13 02:07:31 +03:00
218aab4168
Summary: p4fastimport has been replaced by p4seqimport months ago, on top of that previous assumptions have changed that might make p4fastimport not work (e.g. allowing import to connect to LFS). This change cleans up a lot of unused code and a bunch of tests that no longer make sense. Reviewed By: zhh95 Differential Revision: D8525286 fbshipit-source-id: 91d33e7530bf6df1e1ec92fae3acde0345230247
26 lines
563 B
Python
26 lines
563 B
Python
# (c) 2017-present Facebook Inc.
|
|
from __future__ import absolute_import
|
|
|
|
|
|
def localpath(p):
|
|
return p.lstrip("/")
|
|
|
|
|
|
def getcl(node):
|
|
if node:
|
|
assert node.extra().get("p4changelist") or node.extra().get(
|
|
"p4fullimportbasechangelist"
|
|
)
|
|
if node.extra().get("p4changelist"):
|
|
return int(node.extra()["p4changelist"])
|
|
else:
|
|
return int(node.extra()["p4fullimportbasechangelist"])
|
|
return None
|
|
|
|
|
|
def lastcl(node):
|
|
clnum = getcl(node)
|
|
if clnum:
|
|
return clnum + 1
|
|
return None
|