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.
> + $ 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.)
> + $ rm foo
> + $ touch foo
> + $ hg di
You could use `printf "" > foo` instead of these two lines
> + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> + $ printf "\n" > foo
> + $ hg di
Just `echo` will do that
> + +
> + $ 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)
To: pulkit, #hg-reviewers
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel