662 $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc |
671 $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc |
663 $ hg update -q -C af6d2edbb0d3 |
672 $ hg update -q -C af6d2edbb0d3 |
664 checking out detached HEAD in subrepo s |
673 checking out detached HEAD in subrepo s |
665 check out a git branch if you intend to make changes |
674 check out a git branch if you intend to make changes |
666 |
675 |
667 $ cd .. |
676 check differences made by most recent change |
|
677 $ cd s |
|
678 $ cat > foobar << EOF |
|
679 > woopwoop |
|
680 > |
|
681 > foo |
|
682 > bar |
|
683 > EOF |
|
684 $ git add foobar |
|
685 $ cd .. |
|
686 |
|
687 $ hg diff --subrepos |
|
688 diff --git a/s/foobar b/s/foobar |
|
689 new file mode 100644 |
|
690 index 0000000..8a5a5e2 |
|
691 --- /dev/null |
|
692 +++ b/s/foobar |
|
693 @@ -0,0 +1,4 @@ |
|
694 +woopwoop |
|
695 + |
|
696 +foo |
|
697 +bar (no-eol) |
|
698 |
|
699 $ hg commit --subrepos -m "Added foobar" |
|
700 committing subrepository s |
|
701 created new head |
|
702 |
|
703 $ hg diff -c . --subrepos --nodates |
|
704 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate |
|
705 --- a/.hgsubstate |
|
706 +++ b/.hgsubstate |
|
707 @@ -1,1 +1,1 @@ |
|
708 -32a343883b74769118bb1d3b4b1fbf9156f4dddc s |
|
709 +fd4dbf828a5b2fcd36b2bcf21ea773820970d129 s |
|
710 diff --git a/s/foobar b/s/foobar |
|
711 new file mode 100644 |
|
712 index 0000000..8a5a5e2 |
|
713 --- /dev/null |
|
714 +++ b/s/foobar |
|
715 @@ -0,0 +1,4 @@ |
|
716 +woopwoop |
|
717 + |
|
718 +foo |
|
719 +bar (no-eol) |
|
720 |
|
721 check output when only diffing the subrepository |
|
722 $ hg diff -c . --subrepos s |
|
723 diff --git a/s/foobar b/s/foobar |
|
724 new file mode 100644 |
|
725 index 0000000..8a5a5e2 |
|
726 --- /dev/null |
|
727 +++ b/s/foobar |
|
728 @@ -0,0 +1,4 @@ |
|
729 +woopwoop |
|
730 + |
|
731 +foo |
|
732 +bar (no-eol) |
|
733 |
|
734 check output when diffing something else |
|
735 $ hg diff -c . --subrepos .hgsubstate --nodates |
|
736 diff -r af6d2edbb0d3 -r 255ee8cf690e .hgsubstate |
|
737 --- a/.hgsubstate |
|
738 +++ b/.hgsubstate |
|
739 @@ -1,1 +1,1 @@ |
|
740 -32a343883b74769118bb1d3b4b1fbf9156f4dddc s |
|
741 +fd4dbf828a5b2fcd36b2bcf21ea773820970d129 s |
|
742 |
|
743 add new changes, including whitespace |
|
744 $ cd s |
|
745 $ cat > foobar << EOF |
|
746 > woop woop |
|
747 > |
|
748 > foo |
|
749 > bar |
|
750 > EOF |
|
751 $ echo foo > barfoo |
|
752 $ git add barfoo |
|
753 $ cd .. |
|
754 |
|
755 $ hg diff --subrepos --ignore-all-space |
|
756 diff --git a/s/barfoo b/s/barfoo |
|
757 new file mode 100644 |
|
758 index 0000000..257cc56 |
|
759 --- /dev/null |
|
760 +++ b/s/barfoo |
|
761 @@ -0,0 +1 @@ |
|
762 +foo (no-eol) |
|
763 $ hg diff --subrepos s/foobar |
|
764 diff --git a/s/foobar b/s/foobar |
|
765 index 8a5a5e2..bd5812a 100644 |
|
766 --- a/s/foobar |
|
767 +++ b/s/foobar |
|
768 @@ -1,4 +1,4 @@ |
|
769 -woopwoop |
|
770 +woop woop |
|
771 |
|
772 foo |
|
773 bar (no-eol) |
|
774 |
|
775 $ hg diff --subrepos --stat |
|
776 barfoo | 1 + |
|
777 foobar | 2 +- |
|
778 2 files changed, 2 insertions(+), 1 deletion(-) (no-eol) |
|
779 |
|
780 ensure adding include/exclude ignores the subrepo |
|
781 $ hg diff --subrepos -I s/foobar |
|
782 $ hg diff --subrepos -X s/foobar |
|
783 |
|
784 $ cd .. |