Mercurial > hg
diff hgext/largefiles/lfcommands.py @ 26944:ef5bab63af85
largefiles: specify where .orig files are kept
This patch let's the user specify where .orig files are kept using the
cmdutil.origpath function
author | Christian Delahousse <cdelahousse@fb.com> |
---|---|
date | Tue, 10 Nov 2015 15:08:56 -0800 |
parents | 56b2bcea2529 |
children | 07fc2f2134ba |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Tue Nov 10 14:52:54 2015 -0800 +++ b/hgext/largefiles/lfcommands.py Tue Nov 10 15:08:56 2015 -0800 @@ -444,12 +444,14 @@ updated, removed = 0, 0 for lfile in lfiles: abslfile = repo.wjoin(lfile) + abslfileorig = cmdutil.origpath(ui, repo, abslfile) absstandin = repo.wjoin(lfutil.standin(lfile)) + absstandinorig = cmdutil.origpath(ui, repo, absstandin) if os.path.exists(absstandin): - if (os.path.exists(absstandin + '.orig') and + if (os.path.exists(absstandinorig) and os.path.exists(abslfile)): - shutil.copyfile(abslfile, abslfile + '.orig') - util.unlinkpath(absstandin + '.orig') + shutil.copyfile(abslfile, abslfileorig) + util.unlinkpath(absstandinorig) expecthash = lfutil.readstandin(repo, lfile) if expecthash != '': if lfile not in repo[None]: # not switched to normal file