martinvonz (Martin von Zweigbergk)
User

Projects

User Details

User Since
Jun 28 2017, 5:28 PM (90 w, 5 d)

Recent Activity

Sat, Mar 23

martinvonz abandoned D6140: revset: add new contiguous(x) function for "x::x".
Sat, Mar 23, 12:18 AM

Fri, Mar 22

martinvonz added a reviewer for D6168: readline: provide styled prompt to readline (issue6070): yuja.
Fri, Mar 22, 3:42 PM
martinvonz added a comment to D6168: readline: provide styled prompt to readline (issue6070).
In D6168#89872, @jeffpc wrote:

FWIW, I tested this on both Unleashed (an illumos fork) and FreeBSD. It fixes the issue for me on both.

Thanks for testing, Jeff. I'll queue based on that.

Fri, Mar 22, 2:30 PM
martinvonz added a comment to D6168: readline: provide styled prompt to readline (issue6070).
In D6168#89872, @jeffpc wrote:

FWIW, I tested this on both Unleashed (an illumos fork) and FreeBSD. It fixes the issue for me on both.

Fri, Mar 22, 2:27 PM

Thu, Mar 21

martinvonz closed D6158: memctx: rename constructor argument "copied" to "copysource" (API).
Thu, Mar 21, 7:26 PM
martinvonz closed D6159: memfilectx: override copysource() instead of using dummy nodeid.
Thu, Mar 21, 7:25 PM
martinvonz committed rHG550a172a603b: memctx: rename constructor argument "copied" to "copysource" (API).
memctx: rename constructor argument "copied" to "copysource" (API)
Thu, Mar 21, 7:25 PM
martinvonz committed rHG6fef387af1da: memfilectx: override copysource() instead of using dummy nodeid.
memfilectx: override copysource() instead of using dummy nodeid
Thu, Mar 21, 7:25 PM

Wed, Mar 20

martinvonz added inline comments to D6163: copies: extract function for deciding whether to use changeset-centric algos.
Wed, Mar 20, 3:17 PM
martinvonz created D6163: copies: extract function for deciding whether to use changeset-centric algos.
Wed, Mar 20, 3:03 PM
martinvonz created D6162: getrenamedfn: get copy data from context object if configured.
Wed, Mar 20, 3:03 PM
martinvonz added a dependent revision for D6162: getrenamedfn: get copy data from context object if configured: D6163: copies: extract function for deciding whether to use changeset-centric algos.
Wed, Mar 20, 3:03 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".

Josef 'Jeff' Sipek <jeffpc@josefsipek.net> sent this to mercurial-devel. I'm adding it here for reference.

"x::x" is a useful trick for making a range contiguous, but it gets
annoying if "x" is a long expression. Let's provide a simple function
that helps with that. It also makes it the trick more discoverable.

...

+@predicate('contiguous(set)', safe=True, takeorder=True)
+def contiguous(repo, subset, x, order):
+ """Changesets that have both ancestors and descendants in the set. This
+ effectively fills in gaps in the set to make it contiguous, without adding
+ new common ancestors or common descendants.
+
+ "contiguous(x)" is identical to "x::x".

I read this doc string and the patch intro several times, and every time I
concluded that this function was useless. Only after reading some of the
other replies, did I realize that "x" here can be a set.

Wed, Mar 20, 1:28 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".

Josef 'Jeff' Sipek <jeffpc@josefsipek.net> sent this to mercurial-devel. I'm adding it here for reference.

Wed, Mar 20, 1:24 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".

I've only used X::X where X was trivial, so I'm still trying to get my mind around this. Out of curiosity, what are the scenarios where a nontrivial X is useful?

Wed, Mar 20, 1:21 PM
martinvonz added a comment to D5991: copies: do copy tracing based on ctx.p[12]copies() if configured.

When the test suite is run with --extra-config-opt to use the new copy
tracing, all tests pass, besides test-copies.t (which fails in the
same way as you can see in this patch).

Wed, Mar 20, 2:36 AM
martinvonz created D6158: memctx: rename constructor argument "copied" to "copysource" (API).
Wed, Mar 20, 2:16 AM
martinvonz created D6159: memfilectx: override copysource() instead of using dummy nodeid.
Wed, Mar 20, 2:15 AM
martinvonz added a dependent revision for D6158: memctx: rename constructor argument "copied" to "copysource" (API): D6159: memfilectx: override copysource() instead of using dummy nodeid.
Wed, Mar 20, 2:15 AM

Tue, Mar 19

martinvonz closed D6125: revert: option to choose what to keep, not what to discard.
Tue, Mar 19, 2:33 PM
martinvonz closed D6124: patch: include newline at EOF in help text for interactive patch.
Tue, Mar 19, 2:32 PM
martinvonz committed rHGc1d83d916e85: revert: option to choose what to keep, not what to discard.
revert: option to choose what to keep, not what to discard
Tue, Mar 19, 2:32 PM
martinvonz committed rHG95e4ae86329f: patch: include newline at EOF in help text for interactive patch.
patch: include newline at EOF in help text for interactive patch
Tue, Mar 19, 2:32 PM
martinvonz added a comment to D6124: patch: include newline at EOF in help text for interactive patch.
In D6124#89743, @pulkit wrote:

Amended the following in flight:

Tue, Mar 19, 2:22 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".

I spend some more time thinking about it, especially about the semantic
I would expect from a contiguous function. My conclusion is that I'm
seeing something call contiguous more as a filter than something
adding element to the set.

Tue, Mar 19, 1:08 PM
martinvonz added inline comments to D6125: revert: option to choose what to keep, not what to discard.
Tue, Mar 19, 11:12 AM

Mon, Mar 18

martinvonz added a comment to D6148: store: error out if fncache does not ends with a newline.

Good point. Isn't there a debug command for rebuilding it? We can add a
hint about that.

Mon, Mar 18, 10:45 PM
martinvonz accepted D6058: patch: include flag-only file changes in "special" while filtering patch (issue5864).
Mon, Mar 18, 7:32 PM
martinvonz added inline comments to D6148: store: error out if fncache does not ends with a newline.
Mon, Mar 18, 7:20 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".
In D6140#89474, @yuja wrote:

I think "contiguous" is good as it stands for the main use case. "closure"
seems confusing unless we have stronger math background than computer science.
The other candidates would require more knowledge about the theory.

Mon, Mar 18, 6:54 PM

Sat, Mar 16

martinvonz closed D6143: context: use wdirhex constant instead of calculating it.
Sat, Mar 16, 7:57 PM
martinvonz committed rHG21cc92fea2aa: context: use wdirhex constant instead of calculating it.
context: use wdirhex constant instead of calculating it
Sat, Mar 16, 7:57 PM
martinvonz closed D6127: split: use the new movedirstate() we now have in scmutil.
Sat, Mar 16, 7:57 PM
martinvonz committed rHG42e2c7c52e1b: split: use the new movedirstate() we now have in scmutil.
split: use the new movedirstate() we now have in scmutil
Sat, Mar 16, 7:57 PM
martinvonz added inline comments to D6005: uncommit: added interactive mode -i(issue6062).
Sat, Mar 16, 10:18 AM
martinvonz created D6143: context: use wdirhex constant instead of calculating it.
Sat, Mar 16, 1:21 AM

Fri, Mar 15

martinvonz closed D6126: dirstate: remove obsolete reference to dirstate.beginparentchange.
Fri, Mar 15, 11:11 PM
martinvonz committed rHG42dd69985778: dirstate: remove obsolete reference to dirstate.beginparentchange.
dirstate: remove obsolete reference to dirstate.beginparentchange
Fri, Mar 15, 11:11 PM
martinvonz updated subscribers of D6140: revset: add new contiguous(x) function for "x::x".

I thought of "closure" as well, but I fear it has too many possible meanings, "transitive closure" being one of them in that context (certainly related, but not the same thing), and of course the closures in functional programming.

I think "hull" could be appropriate, if not too pedantic.

I couldn't find out quickly if people dealing with partial ordered sets theory (another way to think of DAGs) actually use "hull", but here's the analogy:
for the convex hull, you add [a, b] (line segment) to the set whenever a and b belong to it, for this "poset hull" you do the same with a::b (which in poset theory would be called the interval [a, b])

Fri, Mar 15, 10:02 PM
martinvonz added a comment to D6005: uncommit: added interactive mode -i(issue6062).

Can you wrap the commit message to 80 columns? I didn't find anything on https://www.mercurial-scm.org/wiki/ContributingChanges about it, but that's how almost everyone else does it.

Fri, Mar 15, 3:40 PM
martinvonz updated subscribers of D6140: revset: add new contiguous(x) function for "x::x".

I chatted a bit with Georges about this. He suggested something along
the line of fill or complete.

Fri, Mar 15, 2:19 PM
martinvonz added a comment to D2010: check-commit: allow foo_bar naming in functions.

If we loosen the naming requirement, I think a good convention would be to have new files use the *modern* convention and for existing code/files to generally stick to the old convention.

That being said, if someone were to introduce a new function into an existing file and wanted to use the modern names, I wouldn't mind.

I would not like to see global, API breaking rewrites for the sake of rewrites. If we wanted to do a global search and replace on variables inside functions, I'd be OK with that (that won't break API compat). But I'm in no rush to do it.

I would also not like to see patches introducing mixed naming conventions within functions. I think we should try to keep things consistent at definitely the function level and possibly the file level.

Fri, Mar 15, 12:37 PM
martinvonz added a comment to D6125: revert: option to choose what to keep, not what to discard.

I understand that it's not at all clear if we want to make this change by default, but I'd appreciate if we can queue this patch as is so I and others can easily start testing it (it's pretty deep inside _performrevert(), so it's hard to do it cleanly in an extension). I don't believe I'm changing the behavior for anyone who has not set the new config.

Fri, Mar 15, 12:33 PM
martinvonz added a comment to D6140: revset: add new contiguous(x) function for "x::x".

I am a fan of this function, I need this on a regular basis. Having an
explicit function for this also open the way to various optimization.
For example we know that a set already has this property we could skip
all computation.

I am ambivalent about the naming however. It feels a bit odd. There are
case where it could be misleading.

Lets look at the following case:

c e
| |
b d
|/
a

the revset (b+c+d+e)::(b+c+d+e) returns the same b+c+d+e, however
the set is not "contiguous" as b+c and d+e as not connected.

Fri, Mar 15, 11:28 AM
martinvonz added a comment to D2010: check-commit: allow foo_bar naming in functions.

Should we queue this patch or abandon it?

Fri, Mar 15, 11:24 AM
martinvonz added inline comments to D6127: split: use the new movedirstate() we now have in scmutil.
Fri, Mar 15, 10:14 AM
martinvonz closed D6133: rebase: fix crash with in-memory rebase and copies.
Fri, Mar 15, 9:55 AM
martinvonz closed D6132: test: demonstrate crash with in-memory rebase and copies.
Fri, Mar 15, 9:55 AM
martinvonz committed rHGe1ceefab9bca: rebase: fix crash with in-memory rebase and copies.
rebase: fix crash with in-memory rebase and copies
Fri, Mar 15, 9:55 AM
martinvonz committed rHGdd1ab72be983: test: demonstrate crash with in-memory rebase and copies.
test: demonstrate crash with in-memory rebase and copies
Fri, Mar 15, 9:55 AM
martinvonz created D6140: revset: add new contiguous(x) function for "x::x".
Fri, Mar 15, 1:27 AM

Thu, Mar 14

martinvonz created D6133: rebase: fix crash with in-memory rebase and copies.
Thu, Mar 14, 5:51 PM
martinvonz added a dependent revision for D6132: test: demonstrate crash with in-memory rebase and copies: D6133: rebase: fix crash with in-memory rebase and copies.
Thu, Mar 14, 5:50 PM
martinvonz created D6132: test: demonstrate crash with in-memory rebase and copies.
Thu, Mar 14, 5:50 PM
martinvonz added inline comments to D6131: crecord: redraw the screen when starting up chunkselector.
Thu, Mar 14, 12:30 AM

Wed, Mar 13

martinvonz created D6127: split: use the new movedirstate() we now have in scmutil.
Wed, Mar 13, 2:39 PM
martinvonz created D6126: dirstate: remove obsolete reference to dirstate.beginparentchange.
Wed, Mar 13, 2:04 PM
martinvonz updated subscribers of D6005: uncommit: added interactive mode -i(issue6062).
In D6005#89211, @pulkit wrote:

Can you update the commit message to explain how this works? I think I saw somewhere else that it first uncommits everything and then does an interactive amend. Is that correct?

Yes, this is correct.

Also, I just tried to use this feature and it failed (depending on how many lines were added). I added two lines to a file, committed, then ran hg uncommit -i and selected the first line. Then I got this:

starting interactive selection
patching file z
Hunk #1 succeeded at 2 with fuzz 2 (offset -1 lines).

Yes this is also expected with the current implementation. Sometimes uncommit can fail and it will report Hunk Failed like this. There is definitely lot to improve in this implementation and I am fine with having this in core first.

Wed, Mar 13, 1:13 PM
martinvonz added a comment to D6115: unamend: added match as argument for scmutil.movedirstate.

Earlier it didn't but now it can I suppose it should after the modification.

Wed, Mar 13, 12:56 AM

Tue, Mar 12

martinvonz added a comment to D6115: unamend: added match as argument for scmutil.movedirstate.

Does hg unamend accept patterns as arguments?

Tue, Mar 12, 8:56 PM
martinvonz added a comment to D6115: unamend: added match as argument for scmutil.movedirstate.

Could you choose the "Abandon Revision" action on this patch so it's clear that it's not meant to be queued?

Tue, Mar 12, 6:33 PM
martinvonz created D6125: revert: option to choose what to keep, not what to discard.
Tue, Mar 12, 6:14 PM
martinvonz created D6124: patch: include newline at EOF in help text for interactive patch.
Tue, Mar 12, 6:13 PM
martinvonz added a dependent revision for D6124: patch: include newline at EOF in help text for interactive patch: D6125: revert: option to choose what to keep, not what to discard.
Tue, Mar 12, 6:13 PM
martinvonz added a comment to D6005: uncommit: added interactive mode -i(issue6062).

Can you update the commit message to explain how this works? I think I saw somewhere else that it first uncommits everything and then does an interactive amend. Is that correct?

Tue, Mar 12, 2:20 PM
martinvonz added inline comments to D6115: unamend: added match as argument for scmutil.movedirstate.
Tue, Mar 12, 12:58 PM

Mon, Mar 11

martinvonz closed D6120: scmutil: document matcher argument of movedirstate().
Mon, Mar 11, 7:17 PM
martinvonz closed D6119: uncommit: move _movedirstate() to scmutil for reuse.
Mon, Mar 11, 7:17 PM
martinvonz committed rHG232d4b9d391a: uncommit: move _movedirstate() to scmutil for reuse.
uncommit: move _movedirstate() to scmutil for reuse
Mon, Mar 11, 7:17 PM
martinvonz committed rHGad4a3e2eedb3: scmutil: document matcher argument of movedirstate().
scmutil: document matcher argument of movedirstate()
Mon, Mar 11, 7:17 PM
martinvonz closed D6118: copies: remove dependency on scmutil by directly using match.exact().
Mon, Mar 11, 7:17 PM
martinvonz committed rHGbf72e4c39f0b: uncommit: convert _fixdirstate() into _movedirstate().
uncommit: convert _fixdirstate() into _movedirstate()
Mon, Mar 11, 7:17 PM
martinvonz committed rHGa791623458ef: copies: remove dependency on scmutil by directly using match.exact().
copies: remove dependency on scmutil by directly using match.exact()
Mon, Mar 11, 7:17 PM
martinvonz closed D6117: uncommit: convert _fixdirstate() into _movedirstate().
Mon, Mar 11, 7:17 PM
martinvonz added a comment to D6120: scmutil: document matcher argument of movedirstate().

Sorry, I forgot (again) to manually add the parent revision. That's done now.

Mon, Mar 11, 6:32 PM
martinvonz added a dependency for D6120: scmutil: document matcher argument of movedirstate(): D6119: uncommit: move _movedirstate() to scmutil for reuse.
Mon, Mar 11, 6:32 PM
martinvonz added a dependent revision for D6119: uncommit: move _movedirstate() to scmutil for reuse: D6120: scmutil: document matcher argument of movedirstate().
Mon, Mar 11, 6:32 PM
martinvonz created D6120: scmutil: document matcher argument of movedirstate().
Mon, Mar 11, 5:08 PM
martinvonz added a comment to D6117: uncommit: convert _fixdirstate() into _movedirstate().

In the documentation part don't you think there should be information about the matcher as there was before D971

Mon, Mar 11, 3:58 PM
martinvonz created D6119: uncommit: move _movedirstate() to scmutil for reuse.
Mon, Mar 11, 2:19 PM
martinvonz created D6118: copies: remove dependency on scmutil by directly using match.exact().
Mon, Mar 11, 2:19 PM
martinvonz added a dependent revision for D6118: copies: remove dependency on scmutil by directly using match.exact(): D6119: uncommit: move _movedirstate() to scmutil for reuse.
Mon, Mar 11, 2:19 PM
martinvonz created D6117: uncommit: convert _fixdirstate() into _movedirstate().
Mon, Mar 11, 2:19 PM
martinvonz added a dependent revision for D6117: uncommit: convert _fixdirstate() into _movedirstate(): D6118: copies: remove dependency on scmutil by directly using match.exact().
Mon, Mar 11, 2:19 PM
martinvonz added a comment to D6116: uncommit: updated explanation of _fixdirstate().

Sorry, I was actually about to send a different patch for updating its documentation. I'll send it in a few minutes and you can let me know what you think.

Mon, Mar 11, 12:39 PM
martinvonz added a comment to D6115: unamend: added match as argument for scmutil.movedirstate.

unamend: made match optional in firdirstate()

Mon, Mar 11, 12:14 PM
martinvonz accepted D5962: copies: add test that makes both the merging csets dirty and fails.
Mon, Mar 11, 11:34 AM
martinvonz accepted D5963: copies: handle a case when both merging csets are not descendant of merge base.
Mon, Mar 11, 11:34 AM
martinvonz added inline comments to D5963: copies: handle a case when both merging csets are not descendant of merge base.
Mon, Mar 11, 11:34 AM
martinvonz added inline comments to D5962: copies: add test that makes both the merging csets dirty and fails.
Mon, Mar 11, 2:42 AM

Sun, Mar 10

martinvonz added a comment to D5963: copies: handle a case when both merging csets are not descendant of merge base.

Gentle ping for review.

Sun, Mar 10, 1:10 PM

Sat, Mar 9

martinvonz accepted D5961: copies: add test that makes both the merging csets dirty and run w/o error.
Sat, Mar 9, 2:49 PM

Fri, Mar 8

martinvonz accepted D6057: split: add tests which demonstrate the issue5864.
Fri, Mar 8, 2:34 PM
martinvonz added inline comments to D6005: uncommit: added interactive mode -i(issue6062).
Fri, Mar 8, 12:41 PM
martinvonz abandoned D6079: tests: simplify test-uncommit.t by removing an unnecessary commit.
Fri, Mar 8, 12:09 PM
martinvonz added inline comments to D6005: uncommit: added interactive mode -i(issue6062).
Fri, Mar 8, 10:03 AM

Thu, Mar 7

martinvonz added inline comments to D6005: uncommit: added interactive mode -i(issue6062).
Thu, Mar 7, 4:07 PM
martinvonz added a comment to D6005: uncommit: added interactive mode -i(issue6062).

Here are some little comments to start with. I haven't even started reviewing the three new functions, but I need to take a break and work on other things a bit now.

Thu, Mar 7, 3:16 PM
martinvonz added a comment to D6005: uncommit: added interactive mode -i(issue6062).

As I said a while ago on IRC, it feels like _fixdirstate() should not need an interactive flag, and it should not even need to be specifically for uncommit. It feels like it should work the same for any case where we move to a different commit without changing the working copy, such as uncommit, unamend, amend, fix (though we may want optimized code paths for some of them). So I took this patch and tried the most naive attempt at unifying the interactive version with the non-interactive version, namely to just drop the code for the interactive path (see patch below). Surprisingly, all tests pass :) So maybe you can just apply the below patch and clean it up (drop the if True), or maybe you need to add tests.

Thu, Mar 7, 2:04 PM
martinvonz added inline comments to D6079: tests: simplify test-uncommit.t by removing an unnecessary commit.
Thu, Mar 7, 11:41 AM