Show More
@@ -58,7 +58,6 class appender: | |||||
58 | def read(self, count=-1): |
|
58 | def read(self, count=-1): | |
59 | '''only trick here is reads that span real file and data''' |
|
59 | '''only trick here is reads that span real file and data''' | |
60 | ret = "" |
|
60 | ret = "" | |
61 | old_offset = self.offset |
|
|||
62 | if self.offset < self.size: |
|
61 | if self.offset < self.size: | |
63 | s = self.fp.read(count) |
|
62 | s = self.fp.read(count) | |
64 | ret = s |
|
63 | ret = s |
@@ -8,7 +8,7 | |||||
8 | import demandimport; demandimport.enable() |
|
8 | import demandimport; demandimport.enable() | |
9 | from node import * |
|
9 | from node import * | |
10 | from i18n import _ |
|
10 | from i18n import _ | |
11 |
import bisect, os, re, sys, urllib, |
|
11 | import bisect, os, re, sys, urllib, stat | |
12 | import ui, hg, util, revlog, bundlerepo, extensions |
|
12 | import ui, hg, util, revlog, bundlerepo, extensions | |
13 | import difflib, patch, time, help, mdiff, tempfile |
|
13 | import difflib, patch, time, help, mdiff, tempfile | |
14 | import errno, version, socket |
|
14 | import errno, version, socket | |
@@ -2197,7 +2197,6 def remove(ui, repo, *pats, **opts): | |||||
2197 | Modified files and added files are not removed by default. To |
|
2197 | Modified files and added files are not removed by default. To | |
2198 | remove them, use the -f/--force option. |
|
2198 | remove them, use the -f/--force option. | |
2199 | """ |
|
2199 | """ | |
2200 | names = [] |
|
|||
2201 | if not opts['after'] and not pats: |
|
2200 | if not opts['after'] and not pats: | |
2202 | raise util.Abort(_('no files specified')) |
|
2201 | raise util.Abort(_('no files specified')) | |
2203 | files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) |
|
2202 | files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) | |
@@ -2659,7 +2658,6 def unbundle(ui, repo, fname1, *fnames, | |||||
2659 | bundle command. |
|
2658 | bundle command. | |
2660 | """ |
|
2659 | """ | |
2661 | fnames = (fname1,) + fnames |
|
2660 | fnames = (fname1,) + fnames | |
2662 | result = None |
|
|||
2663 | for fname in fnames: |
|
2661 | for fname in fnames: | |
2664 | if os.path.exists(fname): |
|
2662 | if os.path.exists(fname): | |
2665 | f = open(fname, "rb") |
|
2663 | f = open(fname, "rb") |
@@ -616,7 +616,7 def rename(src, dst): | |||||
616 | """forcibly rename a file""" |
|
616 | """forcibly rename a file""" | |
617 | try: |
|
617 | try: | |
618 | os.rename(src, dst) |
|
618 | os.rename(src, dst) | |
619 | except OSError, err: |
|
619 | except OSError, err: # FIXME: check err (EEXIST ?) | |
620 | # on windows, rename to existing file is not allowed, so we |
|
620 | # on windows, rename to existing file is not allowed, so we | |
621 | # must delete destination first. but if file is open, unlink |
|
621 | # must delete destination first. but if file is open, unlink | |
622 | # schedules it for delete but does not delete it. rename |
|
622 | # schedules it for delete but does not delete it. rename |
General Comments 0
You need to be logged in to leave comments.
Login now