[PATCH V3] revert: allow configuring the .orig file location

Matt Mackall mpm at selenic.com
Sun Nov 1 19:39:36 UTC 2015


On Mon, 2015-10-26 at 21:41 -0700, Christian Delahousse wrote:
> # HG changeset patch
> # User Zainab Zahid <zzahid at fb.com>
> # Date 1445920380 25200
> #      Mon Oct 26 21:33:00 2015 -0700
> # Branch stable
> # Node ID bf4086fe61d06e3d766a9b00e9e489b4f2b185e9
> # Parent  a9ed5a8fc5e0554d5cb81b7206d2203cc49a2d23
> revert: allow configuring the .orig file location

I think I mentioned before that ".orig" files are in no way specific to
revert, so this patch is rather incomplete:

$ hgrep "[.]orig['\"]"
hgext/largefiles/lfcommands.py:                if (os.path.exists(absstandin + '.orig') and
hgext/largefiles/lfcommands.py:                    shutil.copyfile(abslfile, abslfile + '.orig')
hgext/largefiles/lfcommands.py:                    util.unlinkpath(absstandin + '.orig')
hgext/mq.py:                             (f, f + '.orig'))
hgext/mq.py:                    util.copyfile(absf, absf + '.orig')
hgext/mq.py:                    util.rename(absf, absf + '.orig')
hgext/shelve.py:                util.rename(file, file + ".orig")
mercurial/cmdutil.py:                            bakname = "%s.orig" % rel
mercurial/commands.py:                util.rename(a + ".resolve", a + ".orig")
mercurial/filemerge.py:    back = a + ".orig"
mercurial/patch.py:    # If afile is "a/b/foo" and bfile is "a/b/foo.orig" we assume the
mercurial/subrepo.py:                bakname = "%s.orig" % name

This will need a non-_ version of the helper function, probably with a
shorter name, and probably in scmutil. 


-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list