Mercurial > public > mercurial-scm > hg
diff hgext/largefiles/reposetup.py @ 15224:7c604d8c7e83
largefiles: remove pre-1.9 code from extension first bundled with 1.9
author | Na'Tosha Bard <natosha@unity3d.com> |
---|---|
date | Tue, 11 Oct 2011 10:42:56 +0200 |
parents | 547da6115d1d |
children | f172292cd416 |
line wrap: on
line diff
--- a/hgext/largefiles/reposetup.py Tue Oct 11 23:16:05 2011 -0500 +++ b/hgext/largefiles/reposetup.py Tue Oct 11 10:42:56 2011 +0200 @@ -267,12 +267,7 @@ for lfile in lfdirstate: if not os.path.exists( repo.wjoin(lfutil.standin(lfile))): - try: - # Mercurial >= 1.9 - lfdirstate.drop(lfile) - except AttributeError: - # Mercurial <= 1.8 - lfdirstate.forget(lfile) + lfdirstate.drop(lfile) lfdirstate.write() return orig(text=text, user=user, date=date, match=match, @@ -306,12 +301,7 @@ lfutil.updatestandin(self, standin) lfdirstate.normal(lfile) else: - try: - # Mercurial >= 1.9 - lfdirstate.drop(lfile) - except AttributeError: - # Mercurial <= 1.8 - lfdirstate.forget(lfile) + lfdirstate.drop(lfile) lfdirstate.write() # Cook up a new matcher that only matches regular files or @@ -386,12 +376,8 @@ toupload = toupload.union(set([ctx[f].data().strip() for f\ in files if lfutil.isstandin(f) and f in ctx])) lfcommands.uploadlfiles(ui, self, remote, toupload) - # Mercurial >= 1.6 takes the newbranch argument, try that first. - try: - return super(lfiles_repo, self).push(remote, force, revs, - newbranch) - except TypeError: - return super(lfiles_repo, self).push(remote, force, revs) + return super(lfiles_repo, self).push(remote, force, revs, + newbranch) repo.__class__ = lfiles_repo