[PATCH] largefiles: drop more unnecessary compatibility checks
Greg Ward
greg-hg at gerg.ca
Sun Oct 23 12:45:36 CDT 2011
# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1319379811 14400
# Branch stable
# Node ID c1f912707a0b66c5145a7649b8b7bab20df866d8
# Parent 6e3c560f2fd1bd6e4768a2243a03edc34ba4d6c0
largefiles: drop more unnecessary compatibility checks
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -136,11 +136,8 @@
'''
admin = repo.join(longname)
opener = scmutil.opener(admin)
- if util.safehasattr(repo.dirstate, '_validate'):
- lfdirstate = largefiles_dirstate(opener, ui, repo.root,
- repo.dirstate._validate)
- else:
- lfdirstate = largefiles_dirstate(opener, ui, repo.root)
+ lfdirstate = largefiles_dirstate(opener, ui, repo.root,
+ repo.dirstate._validate)
# If the largefiles dirstate does not exist, populate and create
# it. This ensures that we create it on the first meaningful
diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -82,12 +82,8 @@
extensions.wrapfunction(hg, 'merge', overrides.hg_merge)
extensions.wrapfunction(archival, 'archive', overrides.override_archive)
- if util.safehasattr(cmdutil, 'bailifchanged'):
- extensions.wrapfunction(cmdutil, 'bailifchanged',
- overrides.override_bailifchanged)
- else:
- extensions.wrapfunction(cmdutil, 'bail_if_changed',
- overrides.override_bailifchanged)
+ extensions.wrapfunction(cmdutil, 'bailifchanged',
+ overrides.override_bailifchanged)
# create the new wireproto commands ...
wireproto.commands['putlfile'] = (proto.putlfile, 'sha')
More information about the Mercurial-devel
mailing list