Bugzilla – Bug 180
Slonik DATE command
Last modified: 2011-01-06 13:12:46 PST
You need to
before you can comment on or make changes to this bug.
Add DATE command that emits the current date + time as output from Slonik.
Enables capturing timing information within a script.
Created an attachment (id=80) [details]
Date patch for slonik
An implementation of the date command for slonik.
I'm not quite sure what's up; this doesn't seem to apply to HEAD...
postgres@cbbrowne [12:29:52] [~/slony1-engine.github] [master *]
-> % git checkout -b bug180 master
Switched to a new branch 'bug180'
postgres@cbbrowne [12:29:58] [~/slony1-engine.github]
-> % patch < /tmp/date.patch
patching file slonik_ref.sgml
Hunk #1 FAILED at 379.
1 out of 1 hunk FAILED -- saving rejects to file slonik_ref.sgml.rej
patching file parser.y
Hunk #1 FAILED at 76.
Hunk #2 FAILED at 141.
Hunk #3 FAILED at 376.
Hunk #4 FAILED at 472.
Hunk #5 FAILED at 1597.
Hunk #6 FAILED at 1813.
6 out of 6 hunks FAILED -- saving rejects to file parser.y.rej
patching file scan.l
Hunk #1 FAILED at 88.
Hunk #2 FAILED at 99.
2 out of 2 hunks FAILED -- saving rejects to file scan.l.rej
patching file slonik.c
Hunk #1 FAILED at 264.
Hunk #2 FAILED at 1177.
2 out of 2 hunks FAILED -- saving rejects to file slonik.c.rej
patching file slonik.h
Hunk #1 FAILED at 16.
Hunk #2 FAILED at 64.
Hunk #3 FAILED at 146.
Hunk #4 FAILED at 634.
4 out of 4 hunks FAILED -- saving rejects to file slonik.h.rej
I'll attach the rejection notices from patch.
Created an attachment (id=81) [details]
Results of rejections from patch
Built this tarball thus:
postgres@cbbrowne [12:30:53] [~/slony1-engine.github] [bug180 *]
-> % tar cfvj rejects-date.tar.bz2 `find -name "*.rej"`
A browse of the patch shows that the contents seem quite reasonable. Perhaps
"patch" isn't what I should be using to apply it...
(In reply to comment #4)
> A browse of the patch shows that the contents seem quite reasonable. Perhaps
> "patch" isn't what I should be using to apply it...
I did the reverse patch :-(. Sorry about that, I'll post the correct one as
soon as possible.
I could apply using: "patch -p1 -R < /tmp/date.patch"
Created an attachment (id=82) [details]
Date patch for slonik
patch -p1 < ~/date.patch should do the job
Cool, that's working now.
I have published the patch into a branch in my repo at GitHub.
I added in a further patch that puts DATE commands into one of the regression
If someone else can take a peek at this, it looks addable to me.
This patch has been applied to master