ros-infrastructure/bloom — pull request #281 by po1 (2014-05-29 15:21:42+00:00)
Title: Fix second call to bloom-release on a svn repo

On multi-package SVN repositories, the first release works, but I could consistently make the 2nd one fail.

```bash
==> git-bloom-generate -y rosrelease hydro --source upstream -i 0
Releasing packages: ['foo', 'bar']
Releasing package 'foo' for 'hydro' to: 'release/hydro/foo'
Releasing package 'bar' for 'hydro' to: 'release/hydro/bar'
[git-bloom-patch trim]: 'execute_command' failed to call 'git rm -rf foo bar src' which had a return code (128):
[git-bloom-patch trim]: ```
fatal: pathspec 'src' did not match any files

[git-bloom-patch trim]: ```
Traceback (most recent call last):
File "/home/paulmathieu/github/bloom/bloom/commands/git/generate.py", line 101, in try_execute
retcode = func(*args, **kwargs)
File "/home/paulmathieu/github/bloom/bloom/generators/release.py", line 129, in post_rebase
return trim(trim_d)
File "/home/paulmathieu/github/bloom/bloom/logging.py", line 211, in decorated
return f(*args, **kwds)
File "/home/paulmathieu/github/bloom/bloom/commands/git/patch/trim_cmd.py", line 177, in trim
new_config = _trim(new_config, force, directory)
File "/home/paulmathieu/github/bloom/bloom/commands/git/patch/trim_cmd.py", line 105, in _trim
execute_command('git rm -rf ' + ' '.join(items), cwd=directory)
File "/home/paulmathieu/github/bloom/bloom/util.py", line 434, in execute_command
raise CalledProcessError(result, cmd)
CalledProcessError: Command 'git rm -rf foo bar src' returned non-zero exit status 128

Error calling generator post_rebase: Command 'git rm -rf foo bar src' returned non-zero exit status 128
generator post_rebase returned exit code (128)
<== Error running command '['/usr/local/bin/git-bloom-generate', '-y', 'rosrelease', 'hydro', '--source', 'upstream', '-i', '0']'
```

While I have not investigated the reason why the release repo ends up being dirty, running `git clean` *before* `git rm` fixes the problem.