Show More
@@ -1656,6 +1656,17 b' class gitsubrepo(abstractsubrepo):' | |||||
1656 | elif match(gitprefix): #Subrepo is matched |
|
1656 | elif match(gitprefix): #Subrepo is matched | |
1657 | ui.write(self._gitcommand(cmd)) |
|
1657 | ui.write(self._gitcommand(cmd)) | |
1658 |
|
1658 | |||
|
1659 | def revert(self, ui, substate, *pats, **opts): | |||
|
1660 | ui.status(_('reverting subrepo %s\n') % substate[0]) | |||
|
1661 | if not opts.get('no_backup'): | |||
|
1662 | ui.warn('%s: reverting %s subrepos without ' | |||
|
1663 | '--no-backup is unsupported\n' | |||
|
1664 | % (substate[0], substate[2])) | |||
|
1665 | return [] | |||
|
1666 | ||||
|
1667 | self.get(substate, overwrite=True) | |||
|
1668 | return [] | |||
|
1669 | ||||
1659 | def shortid(self, revid): |
|
1670 | def shortid(self, revid): | |
1660 | return revid[:7] |
|
1671 | return revid[:7] | |
1661 |
|
1672 |
@@ -784,4 +784,21 b' ensure adding include/exclude ignores th' | |||||
784 | $ hg diff --subrepos -I s/foobar |
|
784 | $ hg diff --subrepos -I s/foobar | |
785 | $ hg diff --subrepos -X s/foobar |
|
785 | $ hg diff --subrepos -X s/foobar | |
786 |
|
786 | |||
|
787 | revert the subrepository | |||
|
788 | $ hg revert --all | |||
|
789 | reverting subrepo ../gitroot (glob) | |||
|
790 | ../gitroot: reverting git subrepos without --no-backup is unsupported (glob) | |||
|
791 | ||||
|
792 | $ hg status --subrepos | |||
|
793 | M s/foobar | |||
|
794 | A s/barfoo | |||
|
795 | ||||
|
796 | $ hg revert --no-backup --all | |||
|
797 | reverting subrepo ../gitroot (glob) | |||
|
798 | $ hg revert --no-backup s | |||
|
799 | reverting subrepo ../gitroot (glob) | |||
|
800 | ||||
|
801 | $ hg status --subrepos | |||
|
802 | ? s/barfoo | |||
|
803 | ||||
787 |
$ |
|
804 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now