[SOLVED] (was: emacs vc-region-history: uses git log -L, is there a HG equivalent?)
>>> "UB" == Uwe Brauer writes: >> hg log has a similar option: >> -L --line-range FILE,RANGE [+] follow line range of specified file >> (EXPERIMENTAL) > I just tested it in 5.2. My test was wrong, I tested it again, it works in 5.2 and also in the emacs interface, nice! smime.p7s Description: S/MIME cryptographic signature ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: call for Emacs testers (and opinion) native support of hg ci -i
> Hi Uwe, > On 10/10/2022 22:17, Uwe Brauer wrote: > Sounds really great. > This is interesting and I'd be happy to test it, if I get the time > (that is the hard part as you can imagine). Such a feature could even > get me to actually use `vc-hg`, especially if we can get the variant > for `hg amend -i`. > Can you please clarify this last point? Do you mean that the working > directory parent is not the changeset that has just been created, or > is that a matter of bookmarks? Here is a trivial example. , | hg init | echo "First" > test.org | hg add test.org | echo "syntax: glob" > .hgignore | echo "test-commit-patch.sh" >> .hgignore | hg add .hgignore | hg commit -u "Bernhard Riemann " -m "First" | echo "Second" >> test.org | hg commit -u "Bernhard Riemann " -m "Second" | echo "Third" >> test.org | hg commit -u "Bernhard Riemann " -m "Third" | echo "Forth" >> test.org | echo "file 2" > new.org | hg add new.org | hg commit -m "Added a new file" | echo "secrect" >> new.org | echo "enigma" >> test.org ` It is a bit stupid since both files have each only one hunk, but to explain the point it should be sufficient so the graph looks like changeset: 3:dce8786fefc8 │ Branch: default │ tag: tip │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 16:32:49 +0200 │ Phase: draft │ Summary: Added a new file │ ○ changeset: 2:3994d3e01dab │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Third │ ○ changeset: 1:cb00bbfae330 │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Second │ ○ changeset: 0:5fe2ba3f1f90 Branch: default Author: Bernhard Riemann Date:Sun, 16 Oct 2022 16:32:48 +0200 Phase: draft Summary: First hg status gives M new.org M test.org As to be expected. I do - vc-dir - select both files and run - vc-diff Now in the diff buffer I delete a hunk of one of these files and then commit (vc-next-action) or if using commit-patch, the external lisp package that supports the perl script commit-patch it would be commit-patch-buffer. Now the first patch provided by Dimitry results in the graph ○ changeset: 4:29f54cd57709 │ Branch: default │ tag: tip │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 17:03:51 +0200 │ Phase: draft │ Summary: test the first patche from dimitry │ ◍ changeset: 3:dce8786fefc8 │ Branch: default │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 16:32:49 +0200 │ Phase: draft │ Summary: Added a new file │ ○ changeset: 2:3994d3e01dab │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Third │ ○ changeset: 1:cb00bbfae330 │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Second │ ○ changeset: 0:5fe2ba3f1f90 Branch: default byte 1009 And hg status M new.org M test.org So that looks odd, but is solved by hg up tip ◍ changeset: 4:29f54cd57709 │ Branch: default │ tag: tip │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 17:03:51 +0200 │ Phase: draft │ Summary: test the first patche from dimitry │ ○ changeset: 3:dce8786fefc8 │ Branch: default │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 16:32:49 +0200 │ Phase: draft │ Summary: Added a new file │ ○ changeset: 2:3994d3e01dab │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Third │ ○ changeset: 1:cb00bbfae330 │ Branch: default │ Author: Bernhard Riemann │ Date:Sun, 16 Oct 2022 16:32:48 +0200 │ Phase: draft │ Summary: Second hg status hg status M new.org So the status after applying the first patch is a bit odd. I proposed to include a simple hg up tip in the lisp code But Dimitry preferred to use shelve and unshelve, which results in the same graph and status as commit-patches. However I tried it out with the converted emacs repository, that is I run clone with hg and the hg-git plugin, in which case the repository is instead of 1.1 GB 1.7, but this is to be expected. Be it as it may, in that case a similar test, result in 20 sec for commit-patch and 30 sec for Dimitry's second patch, because it used shelve/unshelve which is slow. Hopes this helps Uwe smime.p7s Description: S/MIME cryptographic signature ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: emacs vc-region-history: uses git log -L, is there a HG equivalent?
> hg log has a similar option: > -L --line-range FILE,RANGE [+] follow line range of specified file > (EXPERIMENTAL) I just tested it in 5.2. Simple repository one file 4 changesets changeset: 3:e68f6e331045 │ Branch: default │ tag: tip │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 10:10:55 +0200 │ Phase: draft │ Summary: New subsection │ ○ changeset: 2:9f72c5eed727 │ Branch: default │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 10:10:35 +0200 │ Phase: draft │ Summary: Appendix │ ○ changeset: 1:5eff8d0a42a5 │ Branch: default │ Author: Uwe Brauer │ Date:Sun, 16 Oct 2022 10:10:20 +0200 │ Phase: draft │ Summary: More stuff │ ○ changeset: 0:b95bb34118c2 Branch: default Author: Uwe Brauer Date:Sun, 16 Oct 2022 10:10:11 +0200 Phase: draft Summary: First commit introduction As hg annote shows oub 0 2022-10-16: * Introduction oub 1 2022-10-16: oub 1 2022-10-16: A bit of more stuff oub 2 2022-10-16: oub 3 2022-10-16: ** New subsection oub 3 2022-10-16: oub 3 2022-10-16: We add a new subsection oub 2 2022-10-16: oub 2 2022-10-16: * Appendix oub 2 2022-10-16: oub 2 2022-10-16: We add an appendix The file looks as , | * Introduction | | A bit of more stuff | | ** New subsection | | We add a new subsection | | * Appendix | | We add an appendix | ` So clearly change set 2 should not be shown when running hg log -L new.org,1:7 --follow BUT changeset: 3:e68f6e331045 tag: tip user:Uwe Brauer date:Sun Oct 16 10:10:55 2022 +0200 summary: New subsection changeset: 2:9f72c5eed727 user:Uwe Brauer date:Sun Oct 16 10:10:35 2022 +0200 summary: Appendix changeset: 1:5eff8d0a42a5 user:Uwe Brauer date:Sun Oct 16 10:10:20 2022 +0200 summary: More stuff changeset: 0:b95bb34118c2 user:Uwe Brauer date:Sun Oct 16 10:10:11 2022 +0200 summary: First commit introduction Which is nonsense. > On 10/16/22 14:22, Uwe Brauer wrote: -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine. smime.p7s Description: S/MIME cryptographic signature ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: emacs vc-region-history: uses git log -L, is there a HG equivalent?
hg log has a similar option: -L --line-range FILE,RANGE [+] follow line range of specified file (EXPERIMENTAL) On 10/16/22 14:22, Uwe Brauer wrote: Hi I tried out, in a small git repository, emacs's vc-region-history It quite nice and useful but supports only git where it relies on «git log -L» I am not aware of any hg equivalent, but may be there is, or it is planned? Regards Uwe Brauer ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel -- Pierre-Yves David ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: call for Emacs testers (and opinion) native support of hg ci -i
Hi Georges Great that a developer is interested, sorry for the delay. > Hi Uwe, > On 10/10/2022 22:17, Uwe Brauer wrote: > Sounds really great. > This is interesting and I'd be happy to test it, if I get the time > (that is the hard part as you can imagine). Such a feature could even > get me to actually use `vc-hg`, especially if we can get the variant > for `hg amend -i`. And hg shelve -i ! > Can you please clarify this last point? Do you mean that the working > directory parent is not the changeset that has just been created, or > is that a matter of bookmarks? Ok, I will prepare an example > Believe it or not, I've never compiled Emacs that I can remember. > Could you please point me to quick instructions to compile it in text > mode only, like `emacs -nw` does ? I suppose it's much simpler and > faster, as GUI dependencies tend to be terrible, and it will be remind > me of VTs time ;-) on which system are you? Linux/Mac/Windows/BSD? Because the configuration depends very much on the OS. Suppose you are on Linux. Then, unfortunately[1] 1) git clone git://git.savannah.gnu.org/emacs.git 2) cd emacs 3) ./autogen.sh 4) ./configure --without-x 5) make bootstrap 6) make Now you could change cd src and run ./.emacs But I am not sure that this is just a good idea. If you run - make install Emacs is installed in the default directory for linux, which is /usr/local I prefer to run - ./configure --prefix=/opt/emacs29 Well actually ./configure --prefix=/opt/emacs29 --with-x-toolkit=athena --without-pop --with-mailutils A word on installation and de-installation, if you are on a Ubuntu/Debian flavored Linux then I recommend to install auto-apt (it was removed in later ubuntu versions for the lack of maintaince but it still can be installed and used. I can send it to you and the run instead of the configure command auto-apt run ./configure --prefix=/opt/emacs29 --with-x-toolkit=athena --without-pop --with-mailutils Then install checkinstall sudo apt-get install checkinstall And instead of running sudo make install Your run sudo checkinstall The benefit is that a debian package is generated and installed so deinstallation works nicely. Please tell me if you have further questions Uwe Footnotes: [1] for speed reasons, or if you have a super fast machine you might try out hg clone git://git.savannah.gnu.org/emacs.git -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine. smime.p7s Description: S/MIME cryptographic signature ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
emacs vc-region-history: uses git log -L, is there a HG equivalent?
Hi I tried out, in a small git repository, emacs's vc-region-history It quite nice and useful but supports only git where it relies on «git log -L» I am not aware of any hg equivalent, but may be there is, or it is planned? Regards Uwe Brauer -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine. smime.p7s Description: S/MIME cryptographic signature ___ Mercurial-devel mailing list Mercurial-devel@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel