Re: [PATCH/RFC] git svn: handle errors and concurrent commits in dcommit
- From
Robert Luberda <robert@debian.org>
- Date
- Aug 8, 2012, 05:32 UTC
- Message-ID
- <5021F9D4.1010700@debian.org>
- In-Reply-To
- <20120802104421.GA13271@dcvr.yhbt.net>
Eric Wong wrote:
Hi,
Show 11 quoted lines
>
> A few minor comments inline...
> Please ensure all error messages and code are readable in
> 80-column terminals.
> Also, keep opening "{" on the same line as the if/unless.
> Backticks don't nest properly, nowadays, we prefer:
> N=$(expr $N + 1)
>> + cp auto_updated_file auto_updated_file_saved
> Need "&&" to check for failure on cp
>> + sed -i 1d auto_updated_file && git commit -am "commit change $N.3" &&
> I don't believe "sed -i" is portable enough for this test.Many thanks for the comments! I've fixed all of the above and will send updated patch in next e-mail. Please let me know if you have any further comments.
Show 9 quoted lines
>> + echo "PATH=\"$PATH\"; export PATH" >> $hook >> + echo "svnconf=\"$svnconf\"" >> $hook >> + cat >> "$hook" <<- 'EOF2' >> + cd work-auto-commits.svn >> + svn up --config-dir "$svnconf" > > That doesn't seem to interact well with users who depend on > svn_cmd pointing to something non-standard. Not sure > what to do about it, though....
I have no idea how to change it either. I've tried to source the lib-git-svn.sh file inside the hook, but it sources test-lib.sh, and the latter script doesn't work well if it is sourced by non-test script. Anyway I the part of my original patch unchanged.
Regards, robert