jeremysilvertongue / historyflattening Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I tried following the instructions and got into this error when I tried running flatten.py:
$ python flatten.py
Traceback (most recent call last):
File "flatten.py", line 1, in <module>
from git import Repo
ImportError: No module named git
Can you add instructions to the README about the required dependencies and how to install them?
Any reason for this script to be here?
I tried to try out a change to this repo, which I of course don't have push rights to, and I got this output:
$ python flatten.py
Creating local branch: 1.3-Exercise
Creating local branch: 1.2-Solution
Creating local branch: 1.2-Exercise
Creating local branch: 1.1-Solution
Creating local branch: 1.1-Exercise
Stashing
Saving snapshot of: 1.1-Exercise
Saving snapshot of: 1.1-Solution
Saving snapshot of: 1.2-Exercise
Saving snapshot of: 1.2-Solution
Saving snapshot of: 1.3-Exercise
Copying snapshot of: 1.1-Exercise
Copying snapshot of: 1.1-Solution
Copying snapshot of: 1.2-Exercise
Copying snapshot of: 1.2-Solution
Copying snapshot of: 1.3-Exercise
Popping
Pushing changes
Traceback (most recent call last):
File "flatten.py", line 138, in <module>
sys.exit(main())
File "flatten.py", line 135, in main
flattener.flatten()
File "flatten.py", line 62, in flatten
self.remote.push(all=True, prune = True)
File "/usr/local/lib/python2.7/site-packages/git/remote.py", line 696, in push
return self._get_push_info(proc, progress or RemoteProgress())
File "/usr/local/lib/python2.7/site-packages/git/remote.py", line 601, in _get_push_info
handle_process_output(proc, stdout_handler, progress_handler, finalize_process)
File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 212, in handle_process_output
return finalizer(process)
File "/usr/local/lib/python2.7/site-packages/git/util.py", line 155, in finalize_process
proc.wait()
File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 319, in wait
raise GitCommandError(self.args, status, self.proc.stderr.read())
git.exc.GitCommandError: 'git push --porcelain --all --prune origin' returned with exit code 128
Of course, the push fails because I don't have push rights. In general though, could the push be optional? I wanted to run the script to see how the directory structure would be like after committing a change on the develop
branch, but of course this scary error happens. And what if (heaven forbid) the script does something that I didn't want to push to the remote. I would like to review those changes before the push.
Also, it's weird that the script tells me this message on line 64, even though it pushes:
print "Done! Review and commit/push the", self.student, "branch at your leisure."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.