Show More
@@ -13,24 +13,24 b' from mercurial import (' | |||||
13 | configtable = {} |
|
13 | configtable = {} | |
14 | configitem = registrar.configitem(configtable) |
|
14 | configitem = registrar.configitem(configtable) | |
15 |
|
15 | |||
16 | configitem('fakepatchtime', 'fakenow', |
|
16 | configitem(b'fakepatchtime', b'fakenow', | |
17 | default=None, |
|
17 | default=None, | |
18 | ) |
|
18 | ) | |
19 |
|
19 | |||
20 | def internalpatch(orig, ui, repo, patchobj, strip, |
|
20 | def internalpatch(orig, ui, repo, patchobj, strip, | |
21 | prefix='', files=None, |
|
21 | prefix=b'', files=None, | |
22 | eolmode='strict', similarity=0): |
|
22 | eolmode=b'strict', similarity=0): | |
23 | if files is None: |
|
23 | if files is None: | |
24 | files = set() |
|
24 | files = set() | |
25 | r = orig(ui, repo, patchobj, strip, |
|
25 | r = orig(ui, repo, patchobj, strip, | |
26 | prefix=prefix, files=files, |
|
26 | prefix=prefix, files=files, | |
27 | eolmode=eolmode, similarity=similarity) |
|
27 | eolmode=eolmode, similarity=similarity) | |
28 |
|
28 | |||
29 | fakenow = ui.config('fakepatchtime', 'fakenow') |
|
29 | fakenow = ui.config(b'fakepatchtime', b'fakenow') | |
30 | if fakenow: |
|
30 | if fakenow: | |
31 | # parsing 'fakenow' in YYYYmmddHHMM format makes comparison between |
|
31 | # parsing 'fakenow' in YYYYmmddHHMM format makes comparison between | |
32 | # 'fakenow' value and 'touch -t YYYYmmddHHMM' argument easy |
|
32 | # 'fakenow' value and 'touch -t YYYYmmddHHMM' argument easy | |
33 | fakenow = util.parsedate(fakenow, ['%Y%m%d%H%M'])[0] |
|
33 | fakenow = util.parsedate(fakenow, [b'%Y%m%d%H%M'])[0] | |
34 | for f in files: |
|
34 | for f in files: | |
35 | repo.wvfs.utime(f, (fakenow, fakenow)) |
|
35 | repo.wvfs.utime(f, (fakenow, fakenow)) | |
36 |
|
36 |
General Comments 0
You need to be logged in to leave comments.
Login now