Extract files not to be pushed in util

This commit is contained in:
Patrick Mezard 2010-11-19 20:14:04 +01:00
parent 3213066d78
commit 0cb57d1778
3 changed files with 5 additions and 7 deletions

View File

@ -2,7 +2,7 @@ from mercurial import util as hgutil
import svnwrap
import svnexternals
import util
class NoFilesException(Exception):
"""Exception raised when you try and commit without files.
@ -106,9 +106,7 @@ def commit(ui, repo, rev_ctx, meta, base_revision, svn):
props = {}
copies = {}
for file in rev_ctx.files():
if file in ('.hgsvnexternals',
'.hgtags',
):
if file in util.ignoredfiles:
continue
new_data = base_data = ''
action = ''

View File

@ -64,9 +64,7 @@ def verify(ui, repo, *args, **opts):
ui.write('difference in file %s\n' % fn)
result = 1
hgfiles = set(ctx)
hgfiles.discard('.hgtags')
hgfiles.discard('.hgsvnexternals')
hgfiles = set(ctx) - util.ignoredfiles
if hgfiles != svnfiles:
missing = set(hgfiles).symmetric_difference(svnfiles)
ui.write('missing files: %s\n' % (', '.join(missing)))

View File

@ -13,6 +13,8 @@ try:
except ImportError:
pass
ignoredfiles = set(['.hgtags', '.hgsvnexternals'])
b_re = re.compile(r'^\+\+\+ b\/([^\n]*)', re.MULTILINE)
a_re = re.compile(r'^--- a\/([^\n]*)', re.MULTILINE)
devnull_re = re.compile(r'^([-+]{3}) /dev/null', re.MULTILINE)