Kiln » largefiles » Unity
Clone URL:  

lfutil: move storeprotonotcapable to lfutil to avoid circular imports (made possible by demandimport, I suppose)

Changeset e9ef9b19296a

Parent ad4fab8afcc2

by Profile picture of User 521Andrew Pritchard <andrewp@fogcreek.com>

Changes to 4 files · Browse files at e9ef9b19296a Showing diff from parent ad4fab8afcc2 Diff from another changeset...

Change 1 of 2 Show Entire File basestore.py Stacked
 
16
17
18
19
20
21
22
 
205
206
207
208
 
209
210
211
 
16
17
18
 
19
20
21
 
204
205
206
 
207
208
209
210
@@ -16,7 +16,6 @@
 from mercurial.i18n import _    import lfutil -import remotestore    class StoreError(Exception):   '''Raised when there is a problem getting files from or putting @@ -205,7 +204,7 @@
  for class_obj in storeproviders:   try:   return class_obj(ui, repo, remote) - except remotestore.storeprotonotcapable: + except lfutil.storeprotonotcapable:   pass     raise util.Abort(_('%s does not appear to be a lfile store'), path)
Change 1 of 1 Show Entire File lfutil.py Stacked
 
502
503
504
 
 
 
 
 
502
503
504
505
506
507
508
@@ -502,3 +502,7 @@
  if x:   return True   return False + +class storeprotonotcapable(BaseException): + def __init__(self, storetypes): + self.storetypes = storetypes
Change 1 of 1 Show Entire File remotestore.py Stacked
 
102
103
104
105
106
107
108
 
102
103
104
 
 
 
 
@@ -102,7 +102,3 @@
  else:   raise util.Abort(_('check failed, unexpected response'   'statlfile: %d') % stat) - -class storeprotonotcapable(BaseException): - def __init__(self, storetypes): - self.storetypes = storetypes
Change 1 of 1 Show Entire File wirestore.py Stacked
 
11
12
13
14
 
15
16
17
 
18
19
20
 
11
12
13
 
14
15
16
 
17
18
19
20
@@ -11,10 +11,10 @@
  def __init__(self, ui, repo, remote):   cap = remote.capable('largefiles')   if not cap: - raise remotestore.storeprotonotcapable([]) + raise lfutil.storeprotonotcapable([])   storetypes = cap.split(',')   if not 'serve' in storetypes: - raise remotestore.storeprotonotcapable(storetypes) + raise lfutil.storeprotonotcapable(storetypes)   self.remote = remote   super(wirestore, self).__init__(ui, repo, remote.url())