##// END OF EJS Templates
subrepo/svn: abort on commit with missing file (issue3029)...
Patrick Mezard -
r16529:3d5d204a stable
parent child Browse files
Show More
@@ -726,6 +726,12 b' class svnsubrepo(abstractsubrepo):'
726 self._ui.status(commitinfo)
726 self._ui.status(commitinfo)
727 newrev = re.search('Committed revision ([0-9]+).', commitinfo)
727 newrev = re.search('Committed revision ([0-9]+).', commitinfo)
728 if not newrev:
728 if not newrev:
729 if not commitinfo.strip():
730 # Sometimes, our definition of "changed" differs from
731 # svn one. For instance, svn ignores missing files
732 # when committing. If there are only missing files, no
733 # commit is made, no output and no error code.
734 raise util.Abort(_('failed to commit svn changes'))
729 raise util.Abort(commitinfo.splitlines()[-1])
735 raise util.Abort(commitinfo.splitlines()[-1])
730 newrev = newrev.groups()[0]
736 newrev = newrev.groups()[0]
731 self._ui.status(self._svncommand(['update', '-r', newrev])[0])
737 self._ui.status(self._svncommand(['update', '-r', newrev])[0])
@@ -120,6 +120,15 b' change file in svn and hg, commit'
120 source file://*/svn-repo/src (glob)
120 source file://*/svn-repo/src (glob)
121 revision 2
121 revision 2
122
122
123 missing svn file, commit should fail
124
125 $ rm s/alpha
126 $ hg commit --subrepos -m 'abort on missing file'
127 committing subrepository s
128 abort: failed to commit svn changes
129 [255]
130 $ svn revert s/alpha > /dev/null
131
123 add an unrelated revision in svn and update the subrepo to without
132 add an unrelated revision in svn and update the subrepo to without
124 bringing any changes.
133 bringing any changes.
125
134
General Comments 0
You need to be logged in to leave comments. Login now