I have the following test file.

  $ hg init diff
  $ cd diff
  $ echo foo > foo
  $ hg add foo
  $ hg ci -m "foo"
  $ echo bar >> foo
  $ hg ci -m "foo+bar"
  $ hg up -r 1
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg cat -r tip foo > foo
  $ cat foo
  foo
  bar
  $ hg diff -r tip
  $ hg up null
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ hg cat -r tip foo > foo
  $ cat foo
  foo
  bar
  $ hg diff -r tip

I would expect the two diff  commands to have the same output (i.e.
nothing).  However, I get the following output:

$ cram diff.t
!
--- diff.t
+++ diff.t.err
@@ -19,3 +19,9 @@
   foo
   bar
   $ hg diff -r tip
+  diff -r 6695c077f203 foo
+  --- a/foo\tMon Nov 14 00:29:46 2016 +0000 (esc)
+  +++ /dev/null\tThu Jan 01 00:00:00 1970 +0000 (esc)
+  @@ -1,2 +0,0 @@
+  -foo
+  -bar

# Ran 1 tests, 0 skipped, 1 failed.

Am I wrong in my expectations?  Is this documented anywhere?

...Stephen
_______________________________________________
Mercurial mailing list
[email protected]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to