/r/mercurial

Photograph via snooOG

a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects.

/r/mercurial

670 Subscribers

3

How to prevent a mercurial commit with no files specified (prevent commiting all modified files) using a hook

Hi everyone,

I am working on a mercurial hook in python to prevent a general commit when one forget to specifies files to be commited. I commited by accident several debug modification and don't want this to happen again.

I would like to make a hook that ask for a confirmation when no files is specified in the commit command.

I got how to create the hook, how to have it called, how to prevent the commit. The one thing I cannot get is how to know if the user specified files in the commit or not. I could use the sys.argv command but that does not satify me.

I can't find a clear mercurial.ui API that explains methods available.

Does anyone know how to get the hg command parameters? (os.environ returns no 'HG_XXXXX' variabele :/)

0 Comments
2023/11/16
13:40 UTC

16

Announcing Mercurial Paris 2023 schedule and speakers

We’ve finalized picking our speakers for the Mercurial Conference Paris 2023!
Come along in April in Paris to hear the #mercurial experts.

Program announcement https://mercurial.paris/posts/2023/01/20/mercurial-paris-2023-speakers-talks-announcement/

#mercurialhg #mercurialscm #dvcs

1 Comment
2023/01/30
16:56 UTC

3

Mercurial Paris Conference will take place on April 05-07 2023 in Paris France. Call for papers are open!

Pleased to announce that Mercurial Paris Conference 2023 will be a three days event that take place from the Wednesday 5th of April 9:00 am to the Friday 7th of April 5:00pm in Paris, Sorbonne University.

Details and ticket registration : https://mercurial.paris/events/mercurial-conference-paris-2023/

Mercurial Paris Conference 2023 is a professional and technical conference around mercurial scm, a free, distributed source control management tool.

If you're involved in anything related to Mercurial development or if you use Mercurial in your company, it's time to solicit you as a speaker, call for papers are open! (Deadline January 16th, 2023)

Hope to see you this spring in Paris!

#mercurial #hg #mercurialscm #dvcs #mercurialconferenceparis

Mercurial Conference Paris April 05-07, 2023

1 Comment
2022/12/08
11:01 UTC

3

Problem with hg pull --rebase

I have encountered the following (in my eyes) weird behavior: If I do hg pull --rebase (which is what Tortoise HG does by default if you click the 'pull' button), and I have in a different branch some drafts that live "on top" of a draft in my current branch, those drafts in the other branch suddenly are merged (well, rebased, really) into my current branch. This is especially bad if the draft in the 'other' branch is a merge commit, because then you accidentially merge the whole 'other' branch into your current branch.

I wrote this up a lot nicer here: https://www.lukas-barth.net/blog/hg-pull-rebase-considered-harmful/

Am I doing something stupid here? This has happened to me twice now and always causes a huge mess because you cannot easily back-out merge commits. I'm convinced that people must have strategies (that are more convenient than the rather complicated manual steps I describe in the write-up) to avoid this.

I think one solution would be to have hg pull --rebase behave like hg rebase --keepbranches, but it looks like I cannot do hg pull --rebase --keepbranches. Is there a hack to achieve that?

0 Comments
2022/11/24
10:53 UTC

1

infocalypse: truly decentralized version control over Freenet

0 Comments
2022/11/05
16:20 UTC

5

Mercurial Conference Paris 2023 - Scheduling poll

We have some new date proposals for the Mercurial Conference Paris 2023.

Please fill in the scheduling poll at the link above to tell us what suit you best: https://framadate.org/B3ub99ayikTS7C8p

#mercurial #mercurialscm #hg #mercurialconferenceparis

1 Comment
2022/10/20
07:23 UTC

2

hggit branches

Hi. We've recently switched from hg to git and I hate it. So locally i use hg with hggit. The only problem with this is that branches in git is translated to tags in hg workbench. Even worse is that only the latest commit in each branch retains the tag. Is there a way to get git branches represented as branches in hg workbench or at least is it possible to filter on the "latest tags" column so i can get some level of organization?

1 Comment
2022/09/21
13:44 UTC

7

Mercurial Conference Paris, September 21-23, 2022 in Paris

Registration for the Mercurial Conference Paris 2022 are open! Come along by the end of September in Paris to hear the Mercurial experts, participate to workshops and sprint sessions.

https://mercurial.paris/events/mercurial-conference-paris-2022/

1 Comment
2022/09/06
08:13 UTC

6

git-remote-hg 0.6 released

1 Comment
2022/08/20
00:45 UTC

3

Smartlog? Smartlog history?

I'm writing a version control system comparison. I've had a lot of experience using Mercurial at Facebook and I'm trying to replicate some custom functionality for my article. The excellent Evolve extension fills most of the gaps but two things I'm still missing are:

  1. The smartlog extension. In addition to just being a good log, there was a feature where you could invoke the smartlog with back/forward timeline controls, viewing your smartlog over time. You could restore an old smartlog once you found the point in history you wanted to get back to. It was essentially "git reflog" meets "macOS' Time Machine GUI" as a TUI.

  2. hg for-each-stacked which was syntactic sugar over hg histedit and executing a command for every commit in your stack. If the command returned successfully (exit 0) it would continue to the next commit, and it would stop if the command ever returned non-zero. You could use this to make sure every commit in your stack passed your unit tests, for example.

Are there open source extensions that fill these gaps that I can make use of?

0 Comments
2022/07/25
02:45 UTC

5

Where is the repo of "Mercurial: the Definitive Guide"?

Is the repo of the updated Mercurial: the Definitive Guide public? Its intro page still contains a link to BitBucket.

4 Comments
2022/06/25
10:04 UTC

3

Is the Mercurial mailing list working?

I subscribed the Mercurial mailing list on 2022-06-19, but I have received no confirmation message yet. Two days later I sent a message to the list address, just in case, but nothing happened. The archive of the current month shows the last message was received on 2022-06-17 and archived two days later.

3 Comments
2022/06/24
14:12 UTC

3

How to specify "--per-file" for extdiff in .hgrc

When configuring an external diff via extdiff in the hgrc file, I can't find how I'm supposed to specify "--per-file". Anyone?

5 Comments
2022/06/14
16:15 UTC

13

Mercurial 6.1.1 released!

3 Comments
2022/04/13
08:55 UTC

2

gitcache equivalent for Mercurial?

Is there a gitcache equivalent for mercurial? or a way to set things up to do something similar.

4 Comments
2022/03/17
23:15 UTC

1

Can I extract file from hg archive?

I am trying to extract files from old mercurial archive.

It's directory is

.hg/store/data/_r_e_a_d_m_e.md.i

all the file extension is followed by .i

and nothing readable.

Is there any way to properly unzip? untar the ~~~-repository.tar.gz?

6 Comments
2022/03/12
07:32 UTC

5

Any Mercurial internal specialists out there?

How many SWEs in the US have deep knowledge and the ability to contribute to mercurial internals? Seems like there is literally 5-10 people out there...

3 Comments
2022/02/15
18:04 UTC

18

Mercurial 6.0.2 released

0 Comments
2022/02/02
16:43 UTC

5

I have been working with Changeset Evolution. Yeah, about that...

It is universally agreed upon that git's reflog is great (Edit: Among main git users, that is). It makes it dead simple to keep track of things and to revert to a previous state.

And that just isn't something I can say about Changeset Evolution (CE). Working with the obslog is a terrible experience. It quickly dissolves into a confusing mess. I have lost work multiple times because I just couldn't figure out which obsolete rev to bring back with touch, and even if I found a suitable one, evolve had wildly different ideas what the final result of rebasing should look like. And when I get it to work after hours of hair pulling, my history looks completely messed up.

I am curious: Were your experiences with CE also bad? Am I doing something wrong? Is there something inherently better and more user friendly about obslog than about reflog?

Any time I am looking for information about CE, all I am hearing about are the technical advantages, but nothing about actual user experience. Also, the documentation is in really bad shape.

Edit: I am an idiot. Take Alphare's advice and use rewind.

View Poll

12 Comments
2021/12/03
20:24 UTC

2

Can't get simple authentication working

Here is my .hg/hgrc of the repo on my server:

[web]
push_ssl = False
allow_push = trident765

[auth]
bb.prefix = http://domainname.com:9090/scratch/test_repo
bb.username = trident765
bb.password = foo_passwd
bb.schemes = http https

Here is the .hg/hgrc of the repo on my home computer:

[paths]
#default = http://trident765:foo_passwd@domainname.com:9090/scratch/test_repo/
default = http://domainname.com:9090/scratch/test_repo/

[auth]
bb.prefix = http://domainname.com:9090/scratch/test_repo/
bb.username = trident765
bb.password = foo_passwd

It doesn't work. I just get the message "abort: authorization failed".

The only way I can get pushing to work is by setting "allow_push = *", but then it just allows anyone to push, regardless of username/password. It seems as if everything under the "[auth]" tag is being completely ignored. How do I get simple authentication working?

2 Comments
2021/08/02
14:26 UTC

8

Hosting service?

The thought crossed my mind today to develop a Mercurial hosting service. But then I remembered that humanity has degenerated into depraved scum who hate what is good and love what is bad. So they all love Git, the worst source control system ever developed. So developing a Mercurial hosting service would just be a waste of my time. Am I wrong?

19 Comments
2021/05/29
02:48 UTC

6

Recommendations for bug tracking with Tortoise HG?

Hey all,

I’ve been tasked with finding a good software that can integrate into Tortoise HG to track bugs. I’ve been looking into a few and would like to know the community’s experience and any recommendations with bug tracking for Tortoise HG.

Thanks in advance

1 Comment
2021/01/04
16:39 UTC

Back To Top