Closed
Bug 1435183
Opened 8 years ago
Closed 8 years ago
Migration fails with 'hg annotate: option --file must not have an argument'
Categories
(Localization Infrastructure and Tools :: Fluent Migration, defect)
Localization Infrastructure and Tools
Fluent Migration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: flod, Assigned: stas)
References
Details
Attachments
(1 file)
Bug 1428000 introduced per-file blame.
I'm trying to test the new migrations locally, by dumb-patching both compare-locales and python-fluent in mozilla-central.
When running the migration, I get the error
> hg annotate: option --file must not have an argument
I printed out the output of cmdbuilder
https://github.com/projectfluent/python-fluent/blob/master/tools/migrate/blame.py#L19
And it results in
hg annotate --date --file=browser/branding/official/brand.dtd --user --template=json --cwd=/Users/flodolo/mozilla/mercurial/l10n_clones/locales/it
Indeed, this fails for me with 4.5
$ hg annotate --file=foo
Using this seems to work, even if it produces a strange output. Not sure if that's even close to proper Python code:
args = cmdbuilder(
b('annotate'), *file_paths, template='json', date=True, user=True,
cwd=self.client.root())
Output:
$ hg annotate --date --cwd=/Users/flodolo/mozilla/mercurial/l10n_clones/locales/it --template=json --user -- browser/branding/official/brand.dtd
I double checked by manually appending a second file to file_paths, and it seems to work
$ hg annotate --date --cwd=/Users/flodolo/mozilla/mercurial/l10n_clones/locales/it --template=json --user -- browser/branding/official/brand.dtd browser/branding/official/brand.properties
Hopefully, there are cleaner ways to get the same result.
| Reporter | ||
Updated•8 years ago
|
| Assignee | ||
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Weird that that changed. You might not need file at all, it shows which line in the file came from which original file, IIRC. That we probably don't care about.
| Assignee | ||
Comment 2•8 years ago
|
||
Yeah, it looks like something like *map(b, file_paths) could work. I'll test in a few when I finish setting this up on my machine. I really don't understand how this worked when I landed...
| Reporter | ||
Comment 3•8 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #0)
> Using this seems to work, even if it produces a strange output.
To clarify: strange output -> "--" at the end of the command, before the list of files
| Assignee | ||
Comment 4•8 years ago
|
||
Assignee: nobody → stas
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•8 years ago
|
||
Fixed in https://github.com/projectfluent/python-fluent/commit/175f358c6ca11b24cc75a3d7fc11a2e4c0ffd92c. Thanks, flod, for testing and reporting the bug!
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•8 years ago
|
||
...and I landed a tiny follow-up which makes sure we don't try to annotate existing FTL files.
| Assignee | ||
Comment 7•8 years ago
|
||
| Assignee | ||
Updated•8 years ago
|
No longer blocks: fluent.migrate
Component: Python Library → Fluent Migration
Product: L20n → Localization Infrastructure and Tools
You need to log in
before you can comment on or make changes to this bug.
Description
•