Giter Club home page Giter Club logo

historyflattening's People

Stargazers

 avatar

Watchers

 avatar

historyflattening's Issues

Add required dependencies

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?

Make pushing optional?

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."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.