I think the trigger is changing lines starting with '--' (found as comments
in .sql scripts). Here is a test case:
11:08:33~/tmp $ mkdir foo
11:08:34~/tmp $ cd foo/
11:08:35~/tmp/foo $ bzr init
11:08:53~/tmp/foo $ vi foo.txt
11:09:39~/tmp/foo $ cat foo.txt
This is jibberish
-- This is an SQL comment
-- CREATE FUNCTION foo
This is more jibberish
11:09:44~/tmp/foo $ bzr add foo.txt
added foo.txt
11:09:51~/tmp/foo $ bzr commit -m 'Whatever'
added foo.txt
Committed revision 1.
11:10:03~/tmp/foo $ vi foo.txt
11:10:22~/tmp/foo $ bzr diff
=== modified file 'foo.txt'
--- foo.txt 2006-12-14 04:09:54 +0000
+++ foo.txt 2006-12-14 04:10:22 +0000
@@ -1,6 +1,8 @@
This is jibberish
-- This is an SQL comment
--- CREATE FUNCTION foo
+CREATE FUNCTION foo AS
+$$
+$$;
This is more jibberish
11:10:24~/tmp/foo $ bzr shelve
bzr: ERROR: bzrlib.patches.PatchSyntax: No mod name
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 626, in
run_bzr_catch_errors
return run_bzr(argv)
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 588, in
run_bzr
ret = run(*run_argv)
File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 292, in
run_argv_aliases
return self.run(**all_cmd_args)
File
"/usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/__init__.py", line
248, in run
s.shelve(source, all, message, no_color)
File "/usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/shelf.py",
line 203, in shelve
patches = patch_source.readpatches()
File
"/usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/patchsource.py",
line 14, in readpatches
return patches.parse_patches(self.readlines())
File "/usr/lib/python2.4/site-packages/bzrlib/patches.py", line 355, in
parse_patches
return [parse_patch(f.__iter__()) for f in iter_file_patch(iter_lines)]
File "/usr/lib/python2.4/site-packages/bzrlib/patches.py", line 310, in
parse_patch
(orig_name, mod_name) = get_patch_names(iter_lines)
File "/usr/lib/python2.4/site-packages/bzrlib/patches.py", line 69, in
get_patch_names
raise PatchSyntax("No mod name")
PatchSyntax: No mod name
bzr 0.13.0 on python 2.4.4.candidate.1 (linux2)
arguments: ['/usr/bin/bzr', 'shelve']
** please send this report to <email address hidden>
11:10:27~/tmp/foo $
I think the trigger is changing lines starting with '--' (found as comments
in .sql scripts). Here is a test case:
11:08:33~/tmp $ mkdir foo
11:08:34~/tmp $ cd foo/
11:08:35~/tmp/foo $ bzr init
11:08:53~/tmp/foo $ vi foo.txt
11:09:39~/tmp/foo $ cat foo.txt
This is jibberish
-- This is an SQL comment
-- CREATE FUNCTION foo
This is more jibberish
11:09:44~/tmp/foo $ bzr add foo.txt
added foo.txt
11:09:51~/tmp/foo $ bzr commit -m 'Whatever'
added foo.txt
Committed revision 1.
11:10:03~/tmp/foo $ vi foo.txt
11:10:22~/tmp/foo $ bzr diff
=== modified file 'foo.txt'
--- foo.txt 2006-12-14 04:09:54 +0000
+++ foo.txt 2006-12-14 04:10:22 +0000
@@ -1,6 +1,8 @@
This is jibberish
-- This is an SQL comment
--- CREATE FUNCTION foo
+CREATE FUNCTION foo AS
+$$
+$$;
This is more jibberish
11:10:24~/tmp/foo $ bzr shelve patches. PatchSyntax: No mod name
bzr: ERROR: bzrlib.
Traceback (most recent call last): python2. 4/site- packages/ bzrlib/ commands. py", line 626, in catch_errors python2. 4/site- packages/ bzrlib/ commands. py", line 588, in python2. 4/site- packages/ bzrlib/ commands. py", line 292, in **all_cmd_ args) python2. 4/site- packages/ bzrlib/ plugins/ bzrtools/ __init_ _.py", line source, all, message, no_color) python2. 4/site- packages/ bzrlib/ plugins/ bzrtools/ shelf.py" , readpatches( ) python2. 4/site- packages/ bzrlib/ plugins/ bzrtools/ patchsource. py", parse_patches( self.readlines( )) python2. 4/site- packages/ bzrlib/ patches. py", line 355, in patch(f. __iter_ _()) for f in iter_file_ patch(iter_ lines)] python2. 4/site- packages/ bzrlib/ patches. py", line 310, in names(iter_ lines) python2. 4/site- packages/ bzrlib/ patches. py", line 69, in
File "/usr/lib/
run_bzr_
return run_bzr(argv)
File "/usr/lib/
run_bzr
ret = run(*run_argv)
File "/usr/lib/
run_argv_aliases
return self.run(
File
"/usr/lib/
248, in run
s.shelve(
File "/usr/lib/
line 203, in shelve
patches = patch_source.
File
"/usr/lib/
line 14, in readpatches
return patches.
File "/usr/lib/
parse_patches
return [parse_
File "/usr/lib/
parse_patch
(orig_name, mod_name) = get_patch_
File "/usr/lib/
get_patch_names
raise PatchSyntax("No mod name")
PatchSyntax: No mod name
bzr 0.13.0 on python 2.4.4.candidate.1 (linux2)
arguments: ['/usr/bin/bzr', 'shelve']
** please send this report to <email address hidden>
11:10:27~/tmp/foo $
-- www.canonical. com/ www.ubuntu. com/
Stuart Bishop <email address hidden> http://
Canonical Ltd. http://