Closed
Bug 980986
Opened 11 years ago
Closed 10 years ago
qimportbz incorrectly prompts to overwrite patch if filename on bug was equal to the bug number
Categories
(Developer Services :: Mercurial: qimportbz, defect)
Developer Services
Mercurial: qimportbz
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/924] )
Attachments
(6 files, 1 obsolete file)
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
|
39 bytes,
text/x-review-board-request
|
gps
:
review+
|
Details |
1) hg qdel 973703
2) hg qimportbz bz://973703
Fetching... done
Parsing... done
adding 973703 to series file
A patch file named '973703' already exists in your patch directory. Rename patch 'add Ro and use consistent punctuation' (8387672) (r)/overwrite (o)? o
applying 973703
now at: 973703
-> The file we're being prompted to overwrite did not exist prior; qimportbz just gets in a muddle because the filename on the bug matches the bug number.
Updated•11 years ago
|
Product: Other Applications → Developer Services
| Assignee | ||
Updated•11 years ago
|
Assignee: emorley → nobody
Updated•11 years ago
|
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/123]
Updated•11 years ago
|
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/123] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/918] [kanban:engops:https://kanbanize.com/ctrl_board/6/123]
Updated•11 years ago
|
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/918] [kanban:engops:https://kanbanize.com/ctrl_board/6/123] [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/918] [kanban:engops:https://kanbanize.com/ctrl_board/6/123] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/923] [kanban:engops:https://kanbanize.com/ctrl_board/6/123] [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/924] [kanban:engops:https://kanbanize.com/ctrl_board/6/123]
Updated•11 years ago
|
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/924] [kanban:engops:https://kanbanize.com/ctrl_board/6/123] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/924]
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → emorley
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•10 years ago
|
||
/r/5311 - qimportbz: Remove support for Mercurial older than v1.9
/r/5313 - qimportbz: Remove support for Python older than v2.6
/r/5315 - qimportbz: pyflakes, pep8, comment & whitespace cleanup
/r/5317 - qimportbz: avoid filename collisions with the temporary patch file (bug 980986)
/r/5319 - qimportbz: don't rename patches to 'y' if no filename entered (bug 980986)
/r/5321 - qimportbz: cleanup the "rename patch" prompt message (bug 980986)
Pull down these commits:
hg pull review -r 9af7b13815ba6893f1f755a465b5362bd94a6d03
Attachment #8577204 -
Flags: review?(gps)
| Assignee | ||
Comment 2•10 years ago
|
||
https://reviewboard.mozilla.org/r/5317/#review4295
::: hgext/qimportbz/__init__.py
(Diff revision 1)
> + name = "%s_" % name
I'm happy to change the suffix string, or switch to a prefix if you think more appropriate. I just thought a suffix wouldn't screw with the sort order, if there are multiple patches and for some reason the patch author gave the first one a filename that matched the bug number, and then bug number + a suffix for the later ones.
Comment 4•10 years ago
|
||
https://reviewboard.mozilla.org/r/5311/#review4375
Good riddance.
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
https://reviewboard.mozilla.org/r/5317/#review4381
Ship It!
::: hgext/qimportbz/__init__.py
(Diff revision 1)
> + ui.write("Changing patch filename to avoid conflict with temporary file.\n")
> + name = "%s_" % name
Suffix works here.
Use ui.status() for informative messages. It is also customary to surround status messages with () to diminish their importance.
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Updated•10 years ago
|
Attachment #8577204 -
Flags: review?(gps) → review+
Comment 10•10 years ago
|
||
Comment on attachment 8577204 [details]
MozReview Request: bz://980986/edmorley
https://reviewboard.mozilla.org/r/5309/#review4387
| Assignee | ||
Comment 11•10 years ago
|
||
https://reviewboard.mozilla.org/r/5317/#review4601
> Suffix works here.
>
> Use ui.status() for informative messages. It is also customary to surround status messages with () to diminish their importance.
Agree about ui.status(), re the brackets, I can't see a precedance for this either in mq or even in Mercurial core - so I think I'll leave without for now (if only for consistency with the rest of qimportbz).
| Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #7)
> Use ui.status() for informative messages.
qimportbz now works as expected when using -q:
[~/src/vctools/hgext/bzexport]$ hg qimport bz://973703
Fetching... done
Parsing... done
adding 973703 to series file
Changing patch filename to avoid conflict with temporary file.
renamed 973703 -> 973703_
[~/src/vctools/hgext/bzexport]$ hg qdel 973703_
[~/src/vctools/hgext/bzexport]$ hg qimport -q bz://973703
adding 973703 to series file
[~/src/vctools/hgext/bzexport]$
The "adding 973703 to series file" comes from mq - seems like it should not be using ui.warn() here:
http://selenic.com/hg/file/b7f936f47f2b/hgext/mq.py#l2153
Would you agree? (Can't face jumping through the ridiculous newsgroup patch posting hoops if you think they won't accept it)
Flags: needinfo?(gps)
| Assignee | ||
Comment 13•10 years ago
|
||
https://hg.mozilla.org/hgcustom/version-control-tools/rev/1212e433a461
https://hg.mozilla.org/hgcustom/version-control-tools/rev/39a2e8248e8a
https://hg.mozilla.org/hgcustom/version-control-tools/rev/98eeed7a40ad
https://hg.mozilla.org/hgcustom/version-control-tools/rev/5d7f5b1eb727
https://hg.mozilla.org/hgcustom/version-control-tools/rev/8043dea8a1af
https://hg.mozilla.org/hgcustom/version-control-tools/rev/5c3aa12de69b
https://hg.mozilla.org/hgcustom/version-control-tools/rev/513b0c301a7c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
I'm not sure if upstream will accept that patch. mq is mostly unloved. Come to think of it, I wouldn't be surprised if they accept it with a response like "yeah, sure."
Flags: needinfo?(gps)
| Assignee | ||
Comment 15•10 years ago
|
||
Attachment #8577204 -
Attachment is obsolete: true
Attachment #8618092 -
Flags: review+
Attachment #8618093 -
Flags: review+
Attachment #8618094 -
Flags: review+
Attachment #8618095 -
Flags: review+
Attachment #8618096 -
Flags: review+
Attachment #8618097 -
Flags: review+
| Assignee | ||
Comment 16•10 years ago
|
||
| Assignee | ||
Comment 17•10 years ago
|
||
| Assignee | ||
Comment 18•10 years ago
|
||
| Assignee | ||
Comment 19•10 years ago
|
||
| Assignee | ||
Comment 20•10 years ago
|
||
| Assignee | ||
Comment 21•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•