New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-from-git should work for single documents #16

Open
d4r3topk opened this Issue Aug 4, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@d4r3topk

d4r3topk commented Aug 4, 2015

./import-from-git /gitfolder/x.txt /home/coder/ - should create x.txt in /home/coder/

./import-from-git /gitfolder/x.txt /home/coder/y.txt - should create y.txt in /home/coder/ with the contents of x.txt.

@ajinkya007 ajinkya007 self-assigned this Apr 10, 2016

@ajinkya007

This comment has been minimized.

Show comment
Hide comment
@ajinkya007

ajinkya007 Apr 11, 2016

Member

@d4r3topk : How is the scenario where the repository already consists y.txt is going to be handled?
Are the contents of x.txt going to be appended to the contents of y.txt or the y.txt will be rewritten ?

Member

ajinkya007 commented Apr 11, 2016

@d4r3topk : How is the scenario where the repository already consists y.txt is going to be handled?
Are the contents of x.txt going to be appended to the contents of y.txt or the y.txt will be rewritten ?

@ajinkya007

This comment has been minimized.

Show comment
Hide comment
@ajinkya007

ajinkya007 Apr 11, 2016

Member

Besides this only takes into consideration when there are txt files. How is it going to be handled for media other than editable text files, like mp3 ,avi etc. ?
There the contents cannot be copied from x.* to y.* file-type.

Member

ajinkya007 commented Apr 11, 2016

Besides this only takes into consideration when there are txt files. How is it going to be handled for media other than editable text files, like mp3 ,avi etc. ?
There the contents cannot be copied from x.* to y.* file-type.

@d4r3topk

This comment has been minimized.

Show comment
Hide comment
@d4r3topk

d4r3topk May 19, 2016

@ajinkya007 : The scenario you mentioned is not handled. What should happen is give the user a choice whether he/she wants to rewrite it or cancel.
I think I have already opened another issue for the type of file.

@ajinkya007 : The scenario you mentioned is not handled. What should happen is give the user a choice whether he/she wants to rewrite it or cancel.
I think I have already opened another issue for the type of file.

@ajinkya007

This comment has been minimized.

Show comment
Hide comment
@ajinkya007

ajinkya007 Jun 6, 2016

Member

@eMBee @d4r3topk : I think this would be unnecessarily complicating the scenario. There can be another case when the x.txt is itself a folder name. And usually if a git repository is imported the entire repo will be imported. The matching of steam-version and git-version of files, checking of content and mimetypes will further add to the complexity.

Member

ajinkya007 commented Jun 6, 2016

@eMBee @d4r3topk : I think this would be unnecessarily complicating the scenario. There can be another case when the x.txt is itself a folder name. And usually if a git repository is imported the entire repo will be imported. The matching of steam-version and git-version of files, checking of content and mimetypes will further add to the complexity.

@eMBee

This comment has been minimized.

Show comment
Hide comment
@eMBee

eMBee Jun 17, 2016

if a filename is specified then it is assumed that this is intentional, and the person running the command knows what they are doing. so ./import-from-git /gitfolder/x.txt /home/coder/y.txt should overwrite y.txt if it exists. or put the file inside if it is a container/room.

i don't see why mimetypes are an issue here. why should ./import-from-git /gitfolder/x.mp3 /home/coder/y.mp3 not work just as well?

eMBee commented Jun 17, 2016

if a filename is specified then it is assumed that this is intentional, and the person running the command knows what they are doing. so ./import-from-git /gitfolder/x.txt /home/coder/y.txt should overwrite y.txt if it exists. or put the file inside if it is a container/room.

i don't see why mimetypes are an issue here. why should ./import-from-git /gitfolder/x.mp3 /home/coder/y.mp3 not work just as well?

@ajinkya007

This comment has been minimized.

Show comment
Hide comment
@ajinkya007

ajinkya007 Jun 17, 2016

Member

I have got it working for the case ./import-from-git /gitfolder/x.txt /home/coder/. The mime type was an issue earlier when the contents were supposed to be appended at the end of file. It would have worked fine for text files but would have been erroneous for other mimetypes.

Member

ajinkya007 commented Jun 17, 2016

I have got it working for the case ./import-from-git /gitfolder/x.txt /home/coder/. The mime type was an issue earlier when the contents were supposed to be appended at the end of file. It would have worked fine for text files but would have been erroneous for other mimetypes.

ajinkya007 referenced this issue in ajinkya007/sTeam Aug 5, 2016

Merge pull request #15 from ajinkya007/Issue#16
Issue #16 Add support for importing a single object.

ajinkya007 pushed a commit that referenced this issue Aug 9, 2016

Merge pull request #16 from Siddhant085/Issue#87
Issue#87: Add login command to allow relogin in debug.pike

ajinkya007 added a commit that referenced this issue Aug 11, 2016

Merge pull request #16 from ajinkya007/Issue#72
Issue#72 Add command to list all the users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment