Skip to content

Commit 7613108

Browse files
committed
Re-comment parts of pip's VersionControl.obtain
Steps to reproduce: mkdir ~/tmp/pipdiff && \ git clone --depth 1 --branch 21.1.4 https://github.com/pypa/pip.git && \ cd pip && \ find . -type f -name '*.py'i \ -exec sed -i 's/from\ pip._/from\ fetchcode.vcs.pip._/g' {} + \ -exec sed -i 's/import\ pip._/import\ fetchcode.vcs.pip._/g' {} + \ -exec sed -i 's/"pip._/"fetchcode.vcs.pip._/g' {} + && \ cd /tmp/pipdiff && \ git clone https://github.com/nexB/fetchcode.git && \ cd fetchcode && \ git checkout ab65b2e && \ cd /tmp/pipdiff && \ diff -Naur fetchcode/src/fetchcode/vcs/pip pip/src/pip This commit contains changes reproduced between copy of pip's src and 8046215 thus authors SoB was added. Signed-off-by: TG1999 <tushar.goel.dav@gmail.com> Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
1 parent ffeec50 commit 7613108

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/fetchcode/vcs/pip/_internal/vcs/versioncontrol.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -580,37 +580,37 @@ def obtain(self, dest, url):
580580
self.name,
581581
url,
582582
)
583-
response = ask_path_exists('What to do? {}'.format(
584-
prompt[0]), prompt[1])
585-
586-
if response == 'a':
587-
sys.exit(-1)
588-
589-
if response == 'w':
590-
logger.warning('Deleting %s', display_path(dest))
591-
rmtree(dest)
592-
self.fetch_new(dest, url, rev_options)
593-
return
594-
595-
if response == 'b':
596-
dest_dir = backup_dir(dest)
597-
logger.warning(
598-
'Backing up %s to %s', display_path(dest), dest_dir,
599-
)
600-
shutil.move(dest, dest_dir)
601-
self.fetch_new(dest, url, rev_options)
602-
return
603-
604-
# Do nothing if the response is "i".
605-
if response == 's':
606-
logger.info(
607-
'Switching %s %s to %s%s',
608-
self.repo_name,
609-
display_path(dest),
610-
url,
611-
rev_display,
612-
)
613-
self.switch(dest, url, rev_options)
583+
# response = ask_path_exists('What to do? {}'.format(
584+
# prompt[0]), prompt[1])
585+
586+
# if response == 'a':
587+
# sys.exit(-1)
588+
589+
# if response == 'w':
590+
# logger.warning('Deleting %s', display_path(dest))
591+
# rmtree(dest)
592+
# self.fetch_new(dest, url, rev_options)
593+
# return
594+
595+
# if response == 'b':
596+
# dest_dir = backup_dir(dest)
597+
# logger.warning(
598+
# 'Backing up %s to %s', display_path(dest), dest_dir,
599+
# )
600+
# shutil.move(dest, dest_dir)
601+
# self.fetch_new(dest, url, rev_options)
602+
# return
603+
604+
# # Do nothing if the response is "i".
605+
# if response == 's':
606+
# logger.info(
607+
# 'Switching %s %s to %s%s',
608+
# self.repo_name,
609+
# display_path(dest),
610+
# url,
611+
# rev_display,
612+
# )
613+
# self.switch(dest, url, rev_options)
614614

615615
def unpack(self, location, url):
616616
# type: (str, HiddenText) -> None

0 commit comments

Comments
 (0)