Mercurial > hg
comparison mercurial/cmdutil.py @ 24866:e1ec3d075c67 stable
record: fix adding new file with record from within a subdir (issue4626)
In my latest change on record (edit newly added file), I forgot the
repo.wjoin() so that record was not computing the paths properly to delete
the backups and was crashing.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Mon, 27 Apr 2015 14:02:49 -0700 |
parents | bff42a92012e |
children | a02d293a1079 |
comparison
equal
deleted
inserted
replaced
24865:d90e50c6e406 | 24866:e1ec3d075c67 |
---|---|
159 if fname in backups: | 159 if fname in backups: |
160 c.write(fp) | 160 c.write(fp) |
161 dopatch = fp.tell() | 161 dopatch = fp.tell() |
162 fp.seek(0) | 162 fp.seek(0) |
163 | 163 |
164 [os.unlink(c) for c in newlyaddedandmodifiedfiles] | 164 [os.unlink(repo.wjoin(c)) for c in newlyaddedandmodifiedfiles] |
165 # 3a. apply filtered patch to clean repo (clean) | 165 # 3a. apply filtered patch to clean repo (clean) |
166 if backups: | 166 if backups: |
167 # Equivalent to hg.revert | 167 # Equivalent to hg.revert |
168 choices = lambda key: key in backups | 168 choices = lambda key: key in backups |
169 mergemod.update(repo, repo.dirstate.p1(), | 169 mergemod.update(repo, repo.dirstate.p1(), |