Skip to content
Snippets Groups Projects

topic: allow specifying current topic using period

Open Sushil Khanchi requested to merge topic/default/cmd-topic-feature into branch/default
3 unresolved threads
+ 26
0
@@ -410,3 +410,29 @@ Changing topic on secret changesets
$ hg phase -r .
33: secret
Amending revisions with current active topic using `hg topic . --rev <revspec>`
-------------------------------------------------------------------------------
$ hg topic . -r "desc('Added h')"
changed topic on 1 changesets to "watwat"
$ hg glog -l 4
* 34:dffbf4099d05 {watwat}
| Added h (book bookboo)
|
| @ 33:894983f69e69 {watwat}
| | Added g ()
| |
x | 26:7c76c271395f {bar}
|/ Added g ()
|
o 25:7f26084dfaf1 {bar}
| Added f ()
~
when no active topic
$ hg topic --clear
$ hg topic . -r "desc('Added h')"
    • Doesn't this look somewhat confusing because . here is not like topic(.), but more like topic(wdir())? And I'm not even sure since when plain . is not only "current revision", but also "current whatever depending on context".

      Also reminds me of . usage in hg bookmarks (that's never good). There, at least, it was a possible argument to --rename, --delete or --list. Without a flag like that, hg topic . looks like it could be equivalent to hg topic --rev . until you see that there's already --rev there.

      So I'd say I'm -0 on this feature. I'd rather keep . meaning "current revision" only.

Please register or sign in to reply
abort: no active topic to amend
[255]
Loading