mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
Extract files not to be pushed in util
This commit is contained in:
parent
3213066d78
commit
0cb57d1778
@ -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 = ''
|
||||
|
@ -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)))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user