##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r6650:2c956597 merge default
parent child Browse files
Show More
@@ -2038,10 +2038,14 b' def rename(ui, repo, patch, name=None, *'
2038 if r:
2038 if r:
2039 wlock = r.wlock()
2039 wlock = r.wlock()
2040 try:
2040 try:
2041 if r.dirstate[name] == 'r':
2041 if r.dirstate[patch] == 'a':
2042 r.undelete([name])
2042 r.dirstate.forget(patch)
2043 r.copy(patch, name)
2043 r.dirstate.add(name)
2044 r.remove([patch], False)
2044 else:
2045 if r.dirstate[name] == 'r':
2046 r.undelete([name])
2047 r.copy(patch, name)
2048 r.remove([patch], False)
2045 finally:
2049 finally:
2046 del wlock
2050 del wlock
2047
2051
@@ -22,4 +22,15 b' ls .hg/patches/bar'
22 hg qrename bar/renamed baz
22 hg qrename bar/renamed baz
23 hg qseries
23 hg qseries
24 ls .hg/patches/baz
24 ls .hg/patches/baz
25 cd ..
25
26
27 echo % test patch being renamed before committed
28 hg init b
29 cd b
30 hg qinit -c
31 hg qnew x
32 hg qrename y
33 hg qcommit -m rename
34 cd ..
35
36
@@ -5,3 +5,4 b' bar/renamed'
5 renamed
5 renamed
6 baz
6 baz
7 .hg/patches/baz
7 .hg/patches/baz
8 % test patch being renamed before committed
General Comments 0
You need to be logged in to leave comments. Login now