azzurris / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

User level Git errors shouldn't produce stack traces #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Shawn Pearce <sop@google.com> on Fri Apr 10 14:16:23 PDT 2009
Source: JIRA REPO-23
Affected Version: 1.6.4

After I submitted a cl (reviewed and everything), I tried to run "repo abandon
<branchname>", but got the following error

$ repo abandon bug_1740989
error: You have local changes to 'apps/Phone/Foo.java'; cannot switch branches.
Traceback (most recent call last):
 File "/Volumes/AndroidHD/.repo/repo/main.py", line 230, in <module>
   _Main(sys.argv[1:])
 File "/Volumes/AndroidHD/.repo/repo/main.py", line 214, in _Main
   repo._Run(argv)
 File "/Volumes/AndroidHD/.repo/repo/main.py", line 121, in _Run
   cmd.Execute(copts, cargs)
 File "/Volumes/AndroidHD/.repo/repo/subcmds/abandon.py", line 42, in Execute
   project.AbandonBranch(nb)
 File "/Volumes/AndroidHD/.repo/repo/project.py", line 747, in AbandonBranch
   quiet=True)
 File "/Volumes/AndroidHD/.repo/repo/project.py", line 829, in _Checkout
   raise GitError('%s checkout %s ' % (self.name, rev))
error.GitError: platform/apps/Phone checkout refs/remotes/korg/master

Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:10

GoogleCodeExporter commented 9 years ago

Original comment by sop+code@google.com on 24 Sep 2009 at 11:12

GoogleCodeExporter commented 9 years ago
You also get a stack trace when running `repo init` without your git identity 
set. To repro:

1. Start from base install of Ubuntu 14.10
2. `sudo apt-get install git python`
3. `wget https://storage.googleapis.com/git-repo-downloads/repo`
4. `chmod +x repo`
5. `mkdir foo`
6. `cd foo`
7. `repo init -u ssh://...`
8. boom

Traceback (most recent call last):
  File "/home/test/sel4test/.repo/repo/main.py", line 500, in <module>
    _Main(sys.argv[1:])
  File "/home/test/sel4test/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/home/test/sel4test/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/test/sel4test/.repo/repo/subcmds/init.py", line 395, in Execute
    self._ConfigureUser()
  File "/home/test/sel4test/.repo/repo/subcmds/init.py", line 289, in _ConfigureUser
    name  = self._Prompt('Your Name', mp.UserName)
  File "/home/test/sel4test/.repo/repo/project.py", line 650, in UserName
    self._LoadUserIdentity()
  File "/home/test/sel4test/.repo/repo/project.py", line 663, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/home/test/sel4test/.repo/repo/project.py", line 2483, in runner
    p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.

Original comment by matthew....@gmail.com on 25 Nov 2014 at 4:57