hgext/largefiles/lfcommands.py
changeset 15793 3ef07ecdb0d5
parent 15663 9036c7d106bf
child 15808 62098aeb1e15
equal deleted inserted replaced
15792:7cbba3adabc7 15793:3ef07ecdb0d5
   453         if os.path.exists(abslfile) and lfile not in repo[None]:
   453         if os.path.exists(abslfile) and lfile not in repo[None]:
   454             os.unlink(abslfile)
   454             os.unlink(abslfile)
   455             ret = -1
   455             ret = -1
   456     state = repo.dirstate[lfutil.standin(lfile)]
   456     state = repo.dirstate[lfutil.standin(lfile)]
   457     if state == 'n':
   457     if state == 'n':
   458         lfdirstate.normal(lfile)
   458         # When rebasing, we need to synchronize the standin and the largefile,
       
   459         # because otherwise the largefile will get reverted.  But for commit's
       
   460         # sake, we have to mark the file as unclean.
       
   461         if getattr(repo, "_isrebasing", False):
       
   462            lfdirstate.normallookup(lfile)
       
   463         else:
       
   464             lfdirstate.normal(lfile)
   459     elif state == 'r':
   465     elif state == 'r':
   460         lfdirstate.remove(lfile)
   466         lfdirstate.remove(lfile)
   461     elif state == 'a':
   467     elif state == 'a':
   462         lfdirstate.add(lfile)
   468         lfdirstate.add(lfile)
   463     elif state == '?':
   469     elif state == '?':