darcs

Issue 2057 Inconsistent handling of patch name corner cases

Title Inconsistent handling of patch name corner cases
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List iago, jaredj
Assigned To
Topics ProbablyEasy, UI

Created on 2011-04-03.09:07:30 by iago, last changed 2017-07-31.00:54:39 by gh.

Files
File name Uploaded Type Edit Remove
unnamed iago, 2011-04-03.09:07:28 text/html
Messages
msg13876 (view) Author: iago Date: 2011-04-03.09:07:28
In short (and making referrence to record or amend-record),

-m "" : Records a patch with an empty name
-m "TAG foo": Records a patch whose name is ".TAG foo" (note TAG was
prefixed by a dot).

$ darcs rec -am ""

Finished recording patch ''

$ darcs rec -am "TAG foo"

Finished recording patch '.TAG foo'


Patch name prompt (interactive mode) prevents both empty patch names and
patch names starting with TAG, although it does not warn the user in any way
and just re-ask the user to introduce another patch name.


> Shall I record this change? (1/1)  [ynW...], or ? for more options: y

What is the patch name?

What is the patch name?

What is the patch name? TAG foo

What is the patch name?


Editing a patch long comment you can record a patch with an empty name and
also a patch name starting with TAG. The "cool" thing is that in this way
you can "automagically" convert a normal patch into a tag just giving a
patch name starting with TAG. Even more, you could amend a tag and remove
the TAG prefix converting it into a normal patch.

$ darcs tag 1.1

Finished tagging patch 'TAG 1.1'

$ darcs amend --edit

Sun Apr  3 09:55:13 WEST 2011  Iago Abal <iago.abal@gmail.com>

  tagged 1.1

Shall I amend this patch? [yN...], or ? for more options: y

Finished amending patch:

Sun Apr  3 09:55:18 WEST 2011  Iago Abal <iago.abal@gmail.com>

  * 1.1

$ darcs show tags

$ darcs amend --edit

Sun Apr  3 09:55:18 WEST 2011  Iago Abal <iago.abal@gmail.com>

  * 1.1

Shall I amend this patch? [yN...], or ? for more options: y

Finished amending patch:

Sun Apr  3 09:55:34 WEST 2011  Iago Abal <iago.abal@gmail.com>

  tagged  1.1

$ darcs show tags

 1.1



-- 
Iago Abal Rivas
Attachments
msg16632 (view) Author: kowey Date: 2013-02-16.14:33:24
If I understand correctly, the bug here is that Darcs does not use the 
same mechanisms for catching patch names that have special meaning in 
Darcs, ie. TAG...) in the interactive UI as it does from the command 
line.  The interactive UI should be caught up.

Should be fixed, test case could be nice, but dunno if actually useful
msg16685 (view) Author: kowey Date: 2013-02-17.13:43:43
See also issue2141.  We do still need (?) to give people a way to amend -
-edit tags.  Presumably we don't want to people to be able to 
accidentally convert tags into non-tags, vice versa
History
Date User Action Args
2011-04-03 09:07:30iagocreate
2013-02-16 14:33:27koweysetpriority: bug
status: unknown -> needs-implementation
topic: + ProbablyEasy, UI
messages: + msg16632
nosy: + jaredj
2013-02-17 13:43:45koweysetmessages: + msg16685
2017-07-31 00:54:39ghsetstatus: needs-implementation -> given-up