git-repo/subcmds
Rob Ward 1829101e28 Add error message for download -c conflicts
Currently if you run repo download -c on a change and the cherry-pick
runs into a merge conflict a Traceback is produced:

rob@rob-i5-lm ~/Programming/repo_test/repo1 $ repo download -c repo1 3/1
From ssh://rob-i5-lm:29418/repo1
 * branch            refs/changes/03/3/1 -> FETCH_HEAD
error: could not apply 0c8b474... 2
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Traceback (most recent call last):
  File "/home/rob/Programming/git-repo/main.py", line 408, in <module>
    _Main(sys.argv[1:])
  File "/home/rob/Programming/git-repo/main.py", line 384, in _Main
    result = repo._Run(argv) or 0
  File "/home/rob/Programming/git-repo/main.py", line 143, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/rob/Programming/git-repo/subcmds/download.py", line 90, in Execute
    project._CherryPick(dl.commit)
  File "/home/rob/Programming/git-repo/project.py", line 1943, in _CherryPick
    raise GitError('%s cherry-pick %s ' % (self.name, rev))
error.GitError: repo1 cherry-pick 0c8b4740f876f8f8372bbaed430f02b6ba8b1898

This amount of error message is confusing to users and has the side effect
of the git message telling you the actual issue being ignored.

This change introduces a message stating that the cherry-pick couldn't
be completed removing the Traceback.

To reproduce the issue create a change that causes a conflict with one currently
in review and use repo download -c to cherry-pick the conflicting change.

Change-Id: I8ddf4e0c8ad9bd04b1af5360313f67cc053f7d6a
2014-02-11 18:19:04 +00:00
..
__init__.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
abandon.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
branches.py Remove trailing whitespace 2013-11-21 19:16:08 +05:30
checkout.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
cherry_pick.py Fix: Missing spaces in printed messages 2013-03-05 17:30:59 +09:00
diff.py Option for 'repo diff' to generate output suitable for 'patch' cmd 2012-04-13 09:20:10 -07:00
download.py Add error message for download -c conflicts 2014-02-11 18:19:04 +00:00
forall.py Print project name for -p on mirror clients 2013-06-03 17:52:01 -07:00
grep.py Tidy up code formatting a bit more 2012-11-14 12:09:38 +09:00
help.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
info.py Remove unused show_smart option on list and info commands 2013-05-16 09:32:18 +09:00
init.py Add --archive option to init to sync using git archive 2013-12-10 08:27:07 +00:00
list.py Remove unused show_smart option on list and info commands 2013-05-16 09:32:18 +09:00
manifest.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
overview.py Some fixes for supporting python3 2013-04-18 21:35:49 +05:30
prune.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
rebase.py repo: Support multiple branches for the same project. 2013-10-14 15:34:32 -07:00
selfupdate.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
smartsync.py Clean up imports 2012-09-18 09:54:57 +02:00
stage.py stage: replace filter on lambda with list comprehension 2013-05-08 06:37:15 +01:00
start.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00
status.py Move Python version checking to a separate module 2013-05-23 07:28:53 +00:00
sync.py Add wrapper module 2014-01-30 15:17:09 -08:00
upload.py Merge "Don't backtrace when current branch is not uploadable." 2014-01-14 00:41:35 +00:00
version.py Change print statements to work in python3 2012-11-13 17:33:56 -08:00