D6307: tests: show IMM is broken when merging file empty in destination

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Apr 24 13:30:45 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> test-rebase-inmemory.t:770
> +  $ cd test
> +  $ echo " " > foo
> +  $ hg ci -Aqm 'added foo'

It seems like it would be a little easier to read the test (the diffs in particular) if a visible character was used. (I assume that the content doesn't matter and you used whitespace only because it's a realistic thing to remove.)

> test-rebase-inmemory.t:773-774
> +
> +  $ rm foo
> +  $ touch foo
> +  $ hg di

You could use `printf "" > foo` instead of these two lines

> test-rebase-inmemory.t:786
> +  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  $ printf "\n" > foo
> +  $ hg di

Just `echo` will do that

> test-rebase-inmemory.t:794
> +  +
> +  $ hg ci -m "remove the whitespace again"
> +  created new head

But this time you're keeping a newline. Could you make that clearer in the commit messages? Something like "make file empty" for the first one and "keep only newline" for the second (feel free to describe it differently, though)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6307

To: pulkit, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list