summaryrefslogtreecommitdiff
path: root/perl/Git/SVN.pm
diff options
context:
space:
mode:
authorRobert Luberda <robert@debian.org>2012-08-08 05:35:00 (GMT)
committerEric Wong <normalperson@yhbt.net>2012-08-10 19:53:18 (GMT)
commite48fb750f579f993062e0e5901e70bd7ddfc94b8 (patch)
treea66089e92d4b41fc6c31b2f64b9264f2839f0a4f /perl/Git/SVN.pm
parent034161a94e827ef05790b1c7ce5a6e3e740c864e (diff)
downloadgit-e48fb750f579f993062e0e5901e70bd7ddfc94b8.zip
git-e48fb750f579f993062e0e5901e70bd7ddfc94b8.tar.gz
git-e48fb750f579f993062e0e5901e70bd7ddfc94b8.tar.bz2
git svn: handle errors and concurrent commits in dcommit
dcommit didn't handle errors returned by SVN and coped very poorly with concurrent commits that appear in SVN repository while dcommit was running. In both cases it left git repository in inconsistent state: index (which was reset with `git reset --mixed' after a successful commit to SVN) no longer matched the checkouted tree, when the following commit failed or needed to be rebased. See http://bugs.debian.org/676904 for examples. This patch fixes the issues by: - introducing error handler for dcommit. The handler will try to rebase or reset working tree before returning error to the end user. dcommit_rebase function was extracted out of cmd_dcommit to ensure consistency between cmd_dcommit and the error handler. - calling `git reset --mixed' only once after all patches are successfully committed to SVN. This ensures index is not touched for most of the time of dcommit run. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'perl/Git/SVN.pm')
0 files changed, 0 insertions, 0 deletions